Method for scanning along a 3-dimensional line and method for scanning a region of interest by scanning a plurality of 3-dimensional lines

ABSTRACT

A method for scanning along a substantially straight line (3D line) lying at an arbitrary direction in a 3D space with a given speed uses a 3D laser scanning microscope having a first pair of acousto-optic deflectors deflecting a laser beam in the x-z plane (x axis deflectors) and a second pair of acousto-optic deflectors deflecting the laser beam in the y-z plane (y axis deflectors) for focusing the laser beam in 3D. Further, a method for scanning a region of interest uses a 3D laser scanning microscope having acousto-optic deflectors for focusing a laser beam within a 3D space defined by an optical axis (Z) of the microscope and X, Y axes that are perpendicular to the optical axis and to each other.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation-in-part of PCT/HU2017/050035, filedon Aug. 31, 2017, which claims priority of Hungarian Patent ApplicationNo. P1600519, filed on Sep. 2, 2016, each of which is incorporatedherein by reference.

TECHNICAL FIELD

The present invention relates to a method for scanning along asubstantially straight line (3D line) lying at an arbitrary direction ina 3D space with a given speed using a 3D laser scanning microscope.

The invention further relates to a method for scanning a region ofinterest with a 3D laser scanning microscope having acousto-opticdeflectors for focusing a laser beam within a 3D space

BACKGROUND OF INVENTION

Neuronal diversity, layer specificity of information processing, areawise specialization of neural mechanisms, internally generated patterns,and dynamic network properties all show that understanding neuralcomputation requires fast read out of information flow and processing,not only from a single plane or point, but at the level of largeneuronal populations situated in large 3D volumes. Moreover, coding andcomputation within neuronal networks are formed not only by the somaticintegration domains, but also by highly non-linear dendritic integrationcenters which, in most cases, remain hidden from somatic recordings.Therefore, it would be desirable to simultaneously read out neuralactivity at both the population and single cell levels. Moreover, it hasrecently been shown that neuronal signaling could be completelydifferent in awake and behaving animals. Therefore novel methods areneeded which can simultaneously record activity patterns of neuronal,dendritic, spinal, and axon assemblies with high spatial and temporalresolution in large scanning volumes in the brain of behaving animals.

Several new optical methods have recently been developed for the fastreadout of neuronal network activity in 3D. Among the available 3Dscanning solutions for multiphoton microscopy, 3D AO scanning is capableof performing 3D random-access point scanning (Katona G, Szalay G, MaakP, Kaszas A, Veress M, Hillier D, Chiovini B, Vizi E S, Roska B, Rozsa B(2012); Fast two-photon in vivo imaging with three-dimensionalrandom-access scanning in large tissue volumes. Nature methods9:201-208) to increase the measurement speed and signal collectionefficiency by several orders of magnitude in comparison to classicalraster scanning. This is because the pre-selected regions of interest(ROI) can be precisely and rapidly targeted without wasting measurementtime for unnecessary background volumes. More quantitatively, 3D AOscanning increases the product of the measurement speed and the squareof the signal-to-noise ratio with the ratio of the total image volume tothe volume covered by the pre-selected scanning points. This ratio canbe very large, about 10⁶-10⁸ per ROI, compared to traditional rasterscanning of the same sample volume.

Despite the evident benefits of 3D random-access AO microscopy, themethod faces two major technical limitations: i) fluorescence data arelost or contaminated with large amplitude movement artifacts during invivo recordings; and ii) sampling rate is limited by the large opticalaperture size of AO deflectors, which must be filled by an acoustic waveto address a given scanning point. The first technical limitation occursbecause the actual location of the recorded ROIs is continuouslychanging during in vivo measurements due to tissue movement caused byheartbeats, blood flow in nearby vessels, respiration, and physicalmotion. This results in fluorescence artifacts because of the spatialinhomogeneity in the baseline fluorescence signal of all kinds offluorescent labelling. Moreover, there is also a spatial inhomogeneityin relative fluorescence changes within recorded compartments;therefore, measurement locations within a somata or dendriticcompartment are not equivalent. In addition, the amplitudes ofmotion-induced transients can even be larger than the ones induced byone or a few action potentials detected by genetically encoded calciumindicators (GECIs). Moreover, the kinetics of Ca²⁺ transients and motionartifacts could also be very similar. Therefore it is really difficultto separate post-hoc the genuine fluorescence changes associated withneural activity from the artifacts caused by brain movement. The secondtechnical problem with 3D point-by-point scanning is the relatively longswitching time, which limits either the measurement speed or the numberof ROIs. This is because to achieve large scanning volumes with a highspatial resolution, large AO deflector apertures are needed. However, tofill these large apertures with an acoustic signal takes considerabletime. Therefore, the resulting long-duration AO switching time does notallow volume or surface elements to be generated from single points inan appropriate time period.

The robust performance of 3D point-by-point scanning performed with AOmicroscopes has been demonstrated in earlier works in slice preparationsor in anesthetized animals. In these studies, 3D scanning was achievedby using two groups of x and y deflectors. During focusing, the second x(and y) deflector's driver function was supplemented with counterpropagating, acoustic waves with a linearly increasing (chirped)frequency programmed to fully compensate for the lateral drift of thefocal spot—this drift would otherwise be caused by the continuouslyincreasing mean acoustic frequency in the chirped wave. In this way, thepoint scanning method yields high pointing stability but requiresrelatively long switching times, because it is necessary to fill thelarge AO deflector apertures each time when addressing a new point in3D.

An alternative continuous trajectory scanning method (Katona G, SzalayG, Maak P, Kaszas A, Veress M, Hillier D, Chiovini B, Vizi E S, Roska B,Rozsa B (2012); Fast two-photon in vivo imaging with three-dimensionalrandom-access scanning in large tissue volumes. Nature methods9:201-208) allows shorter pixel dwell times, but in this case, the fastlateral scans are restricted to two dimensions; 3D trajectory scans,however, still need to be interrupted by time-consuming jumps whenmoving along the z axis. In other words, scanning along the z axis stillsuffers from the same limitation as during point-by-point scanning.

It is an objective of the present invention to overcome the problemsassociated with the prior art. In particular, it is an objective of theinvention to generalize the previous methods by deriving a one-to-onerelationship between the focal spot coordinates and speed, and the chirpparameters of the four AO deflectors to allow fast scanning drifts withthe focal spot not only in the horizontal plane, but also along any 3Dline, starting at any point in the scanning volume (3D drift AOscanning).

SUMMARY OF INVENTION

These objectives are achieved by a method for scanning along asubstantially straight line (3D line) lying at an arbitrary direction ina 3D space with a given speed using a 3D laser scanning microscopehaving a first pair of acousto-optic deflectors deflecting a laser beamin the x-z plane (x axis deflectors) and a second pair of acousto-opticdeflectors deflecting the laser beam in the y-z plane (y axisdeflectors) for focusing the laser beam in 3D, the method comprising:

determining the coordinates x₀(0), y₀(0), z₀(0) of one end of the 3Dline serving as the starting point,

determining scanning speed vector components v_(x0), v_(y0), v_(zx0)(=v_(zy0)) such that the magnitude of the scanning speed vectorcorresponds to the given scanning speed and the directions of thescanning speed vector corresponds to the direction of the 3D line,

providing non-linear chirp signals in the x axis deflectors according tothe function:

${f_{ix}\left( {x,t} \right)} = {{f_{ix}\left( {0,0} \right)} + {\left( {{b_{xi}*\left( {t - \frac{D}{2*v_{a}} - \frac{x_{i}}{v_{a}}} \right)} + c_{xi}} \right)*\left( {t - \frac{D}{2*v_{a}} - \frac{x_{i}}{v_{a}}} \right)}}$

wherein

i=1 or 2 indicates the first and second x axis deflector respectively, Dis the diameter of the AO deflector; and v_(a) is the propagation speedof the acoustic wave within the deflector andΔƒ_(0x)=ƒ_(1x)(0,0)−ƒ_(2x)(0,0))≠0

and providing non-linear chirp signals in the y axis deflectorsaccording to the function:

${f_{iy}\left( {y,t} \right)} = {{f_{iy}\left( {0,0} \right)} + {\left( {{b_{yi}*\left( {t - \frac{D}{2*v_{a}} - \frac{y_{i}}{v_{a}}} \right)} + c_{yi}} \right)*\left( {t - \frac{D}{2*v_{a}} - \frac{y_{i}}{v_{a}}} \right)}}$

wherein

i=1 or 2 indicates the first and second x axis deflector respectively,andΔƒ_(0y)=ƒ_(1y)(0,0)−ƒ_(2y)(0,0))≠0

wherein Δf_(0x), b_(x1), b_(x2), c_(x1), c_(x2), Δf_(0y), b_(y1),b_(y2), c_(y1), and c_(y2) are expressed as a function of the initiallocation (x₀(0), y₀(0), z₀(0)) and vector speed (v_(x0), v_(y0),v_(zx0)=v_(zy0)) of the focal spot.

In the context of the present invention a 3D line is a line that has anon-zero dimension along the optical axis (z axis) of the microscope anda non-zero dimension along a plane perpendicular to the optical axis(x-y plane). Accordingly a line that is parallel with the optical axisis not considered a 3D line nor a line lying purely in an x-y plane. Theequation of the line can be described by a set of linear equations whoseparameters of the line path are selected according to the generalformula, in 3D:x ₀ =x ₀(0)+s*v _(x0)y ₀ =y ₀(0)+s*v _(y0)z ₀ =z ₀(0)+s*v _(z0)

Since the deflectors are deflecting in the x-z and y-z planes, theseequations can be transformed into the equations describing the lineprojections onto the x-z and y-z planes:

$z_{0} = {{{m*x_{0}} + n} = {{z_{0}(0)} + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*x_{0}} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}}}$$z_{0} = {{{k*x_{0}} + l} = {{z_{0}(0)} + {\frac{v_{zy0}}{v_{y0}}*y_{0}} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}}}$

With these we imply that the initial velocity valuesv_(zx0)=v_(zy0)=v_(z0), and the parameters m, n, k, l are determined bythe initial velocity values v_(x0), v_(y0), v_(z0) along the x, y, zaxes:

$m = \frac{v_{{zx}\; 0}}{v_{x\; 0}}$$k = \frac{v_{{zx}\; 0}}{v_{y\; 0}}$$n = {{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}}$$l = {{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}}$

Preferably, the parameters Δf_(0x), b_(x1), b_(x2), c_(x1), c_(x2),Δf_(0y), b_(y1), b_(y2), c_(y1), and c_(y2) are expressed as

$\mspace{20mu}{{\Delta\; f_{0\; x}} = \frac{{x_{0}(0)}*F_{2}}{K*F_{obj}*F_{1}}}$$\mspace{20mu}{b_{x\; 1} = {\frac{v_{{zx}\; 0}*v_{a}}{4*K}*\left( \frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*\frac{{x_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}} \right)^{2}}}$$\mspace{20mu}{b_{x\; 2} = {\frac{v_{{zx}\; 0}*v_{a}}{4*K}*\left( \frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*\frac{{x_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}} \right)^{2}}}$$c_{x\; 1} = {{\frac{M*v_{a}}{2*K}*\left( {\frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*\frac{{x_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}} - \frac{M}{F_{obj}}} \right)} + {\frac{v_{x\; 0}}{2*K*M}*\left( {{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}} \right)*\left( \frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*\frac{{x_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}} \right)^{2}}}$$c_{x\; 2} = {{\frac{M*v_{a}}{2*K}*\left( {\frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*\frac{{x_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}} - \frac{M}{F_{obj}}} \right)} - {\frac{v_{x\; 0}*\left( {{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*x_{0}(0)}} \right)}{2*K*M}*\left( \frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*\frac{{x_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}} \right)^{2}}}$$\mspace{20mu}{{\Delta\; f_{0\; y}} = \frac{{y_{0}(0)}*F_{2}}{K*F_{obj}*F_{1}}}$$\mspace{20mu}{b_{y\; 1} = {\frac{v_{{zy}\; 0}*v_{a}}{4*K}*\left( \frac{M + {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*\frac{{y_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}} \right)^{2}}}$$\mspace{20mu}{b_{y\; 2} = {\frac{v_{{zy}\; 0}*v_{a}}{4*K}*\left( \frac{M + {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*\frac{{y_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}} \right)^{2}}}$$c_{y\; 1} = {{\frac{M*v_{a}}{2*K}*\left( {\frac{M + {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*\frac{{y_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}} - \frac{M}{f_{obj}}} \right)} + {\frac{v_{y\; 0}*\left( {{z_{0}(0)} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}} \right)}{2*K*M}*\left( \frac{M + {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*\frac{{x_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}} \right)^{2}}}$$c_{y\; 2} = {{\frac{M*v_{a}}{2*K}*\left( {\frac{M + {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*\frac{{y_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}} - \frac{M}{f_{obj}}} \right)} - {\frac{v_{y\; 0}*\left( {{z_{0}(0)} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}} \right)}{2*K*M}*\left( \frac{M + {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*\frac{{y_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}} \right)^{2}}}$

The present invention provides a novel method, 3D drift AO microscopy,in which, instead of keeping the same scanning position, the excitationspot is allowed to drift in any direction with any desired speed in 3Dspace while continuously recording fluorescence data with no limitationin sampling rate. To realize this, non-linear chirps are used in the AOdeflectors with parabolic frequency profiles. The partial driftcompensation realized with these parabolic frequency profiles allows thedirected and continuous movement of the focal spot in arbitrarydirections and with arbitrary velocities determined by the temporalshape of the chirped acoustic signals. During these fast 3D drifts ofthe focal spot the fluorescence collection is uninterrupted, lifting thepixel dwell time limitation of the previously used point scanning. Inthis way pre-selected individual scanning points can be extended tosmall 3D lines, surfaces, or volume elements to cover not only thepre-selected ROIs but also the neighbouring background areas or volumeelements.

According to another aspect the invention provides a method for scanninga region of interest with a 3D laser scanning microscope havingacousto-optic deflectors for focusing a laser beam within a 3D spacedefined by an optical axis (Z) of the microscope and X, Y axes that areperpendicular to the optical axis and to each other, the methodcomprising:

-   -   selecting guiding points along the region of interest,    -   fitting a 3D trajectory to the selected guiding points,    -   extending each scanning point of the 3D trajectory to        substantially straight lines (3D lines) lying in the 3D space        such as to extend partly in the direction of the optical axis,        which 3D lines are transversal to the 3D trajectory at the given        scanning points and which straight lines, together, define a        substantially continuous surface,    -   scanning each 3D line by focusing the laser beam at one end of        the 3D line and providing non-linear chirp signals for the        acoustic frequencies in the deflectors for continuously moving        the focus spot along the 3D line.

The 3D lines may be for example of 5 to 20 μm length.

Preferably, the 3D lines are substantially perpendicular to the 3Dtrajectory.

Preferably, the method includes extending each scanning point of the 3Dtrajectory to a plurality of parallel substantially straight lines of 5to 20 μm length defining surfaces that are substantially transversal tothe 3D trajectory at the given scanning points.

Preferably, the method includes extending each scanning point of the 3Dtrajectory to a plurality of parallel substantially straight lines of 5to 20 μm length which straight lines, together, define a substantiallycontinuous volume such that the 3D trajectory is located inside thisvolume.

Preferably, the method includes extending each scanning point of the 3Dtrajectory to a plurality of parallel substantially straight lines of 5to 20 μm length defining cuboides that are substantially centred on the3D trajectory at the given scanning points.

Although there are several ways to extend single scanning points tosurface and volume elements, the combinations of 3D lines, surfaces andvolumes are almost unlimited, the inventors have found six new scanningmethods that are particularly advantageous: 3D ribbon scanning;chessboard scanning; multi-layer, multi-frame imaging; snake scanning;multi-cube scanning; and multi-3D line scanning. Each of them is optimalfor a different neurobiological aim.

Volume or area scanning used in these methods allows motion artifactcorrection on a fine spatial scale and, hence, the in vivo measurementof fine structures in behaving animals. Therefore, fluorescenceinformation can be preserved from the pre-selected ROIs during 3Dmeasurements even in the brain of behaving animals, while maintainingthe 10-1000 Hz sampling rate necessary to resolve neural activity at theindividual ROIs. It can be demonstrated that these scanning methods candecrease the amplitude of motion artifacts by over an order of magnitudeand therefore enable the fast functional measurement of neuronal somataand fine neuronal processes, such as dendritic spines and dendrites,even in moving, behaving animals in a z-scanning range of more than 650μm in 3D.

Further advantageous embodiments of the invention are defined in theattached dependent claims.

BRIEF DESCRIPTION OF DRAWINGS

Further details of the invention will be apparent from the accompanyingfigures and exemplary embodiments.

FIG. 1A is a schematic illustration of longitudinal and transversalscanning with a laser scanning acousto-optic microscope.

FIG. 1B are diagrams showing exemplified dendritic and spine transientswhich were recorded using 3D random-access point scanning during motion(light) and rest (dark) from one dendritic and one spine ROI indicatedwith white triangles in the inset.

FIG. 1C is a 3D image of a dendritic segment of a selectedGCaMP6f-labelled neuron and a selected ribbon around the dendriticsegment shown with dashed line.

FIG. 1D illustrates colour coded diagrams showing average Ca²⁺ responsesalong the ribbon of FIG. 1C during spontaneous activity using thelongitudinal (left) and the transversal (right) scanning modes.

FIG. 2A is a diagram of brain motion recordings.

FIG. 2B shows a normalized amplitude histogram of the recorded brainmotion. Inset shows average and average peak-to-peak displacements inthe resting and running periods.

FIG. 2C shows the normalized change in relative fluorescence amplitudeas a function of distance. Inset shows dendritic segment example.

FIG. 2D is an image of a soma of a GCaMP6f-labelled neuron (left), andnormalized increase in signal-to-noise ratio (right).

FIG. 2E corresponds to FIG. 2D, but for dendritic recordings.

FIG. 2F shows the diagrams of brain motion recordings before and aftermotion correction.

FIG. 2G shows further examples for motion-artifact correction.

FIG. 2H shows somatic transients with and without motion correction.

FIG. 3A is a schematic perspective view of multiple dendritic segments.

FIG. 3B shows numbered frames in the x-y and x-z plans indicating twelve3D ribbons used to simultaneously record twelve spiny dendriticsegments.

FIG. 3C shows the results of fluorescence recordings made simultaneouslyalong the 12 dendritic regions shown in FIG. 3B.

FIG. 3D shows Ca²⁺ transients derived from the 132 numbered regionshighlighted in FIG. 3C.

FIG. 3E shows raster plots of activity pattern of the dendritic spinesindicated in FIG. 3C.

FIG. 3F shows Ca²⁺ transients from the five exemplified dendritic spinesindicated with numbers in FIG. 3C.

FIG. 3G shows raster plot of the activity pattern of the five dendriticspines from FIG. 3F.

FIG. 4A shows a schematic perspective illustration of chessboardscanning.

FIG. 4B is a schematic perspective view of the selected scanningregions.

FIG. 4C shows a schematic image of 136 somata during visual stimulation.

FIG. 4D shows representative somatic Ca²⁺ responses derived from thecolour-coded regions in FIG. 4C following motion-artifact compensation.

FIG. 4E shows raster plot of average Ca²⁺ responses induced with movinggrating stimulation into eight different directions from the colourcoded neurons shown in FIG. 4C.

FIG. 4F is a schematic perspective view of multi-frame scanning.

FIG. 4G is a dendritic image of a selected GCaMP6f-labelled layer Vpyramidal neuron selected from a sparsely labelled V1 network.

FIG. 4H is the x-z projection of the neuron shown in FIG. 4G, depictssimultaneously imaged dendritic and somatic Ca²⁺ responses.

FIG. 4I is a derived Ca²⁺ transients for each ROI.

FIG. 5A is a 3D view of a layer II/III neuron labelled with the GCamP6fsensor, where rectangles indicate four simultaneously imaged layers.

FIG. 5B shows average baseline fluorescence in the four simultaneouslymeasured layers shown in FIG. 5A.

FIG. 5C shows somatic Ca²⁺ responses derived from the numbered yellowsub-regions shown in FIG. 5B following motion artifact elimination.

FIG. 5D shows averaged baseline fluorescence images from FIG. 5B.

FIG. 6A shows a schematic perspective illustration of snake scanning.

FIG. 6B is a z projection of a pyramidal neuron in V1 region labelledwith GCaMP6f sensor using sparse labeling and shows selected dendriticsegment at an enlarged scale.

FIG. 6C shows the results of fast snake scanning performed at 10 Hz inthe selected dendritic region shown in FIG. 6B.

FIG. 6D is the same dendritic segment as in FIG. 6C, but the 3D volumeis shown as x-y and z-y plane projections.

FIG. 6E shows a schematic perspective illustration of 3D multi-cubescanning.

FIG. 6F shows volume-rendered image of 10 representative cubes selectingindividual neuronal somata for simultaneous 3D volume imaging.

FIG. 6G shows Ca²⁺ transients derived from the 10 cubes shown in FIG. 6Ffollowing 3D motion correction.

FIG. 7A shows a schematic perspective illustration of multi-3D linescanning.

FIG. 7B shows amplitude of brain motion, average motion direction isshown by arrow.

FIG. 7C is a z projection of a layer 2/3 pyramidal cell, labelled withGCaMP6f, white lines indicate the scanning line running through 164pre-selected spines.

FIG. 7D shows single raw Ca²⁺ response recorded along 14 spines usingmulti-3D line scanning.

FIG. 7E shows exemplified spine Ca²⁺ transients induced by movinggrating stimulation in four different directions.

FIG. 7F shows selected Ca²⁺ transients measured using point scanning(left) and multi-3D line scanning (right).

FIG. 8 shows a schematic perspective illustration of the fast different3D scanning methods according to the present invention.

FIG. 9 shows a schematic illustration of the optical geometry of a 3Dscanner and focusing system.

SUMMARY OF REFERENCE NUMERALS

10 microscope 12 laser source 14 laser beam 16 acousto-optic deflector18 objective 20 detector 26 sample

DESCRIPTION OF EMBODIMENTS

An exemplary laser scanning acousto-optic (AO) microscope 10 isillustrated in FIG. 1A which can be used to perform the method accordingto the invention. The AO microscope 10 comprises a laser source 12providing a laser beam 14, acousto-optic deflectors 16 and an objective18 for focusing the laser beam 14 on a sample, and one or more detectors20 for detecting back scattered light and/or fluorescent light emittedby the sample. Other arrangement of the AO deflectors 16 is alsopossible as known in the art. Further optical elements (e.g. mirrors,beam splitters, Faraday isolator, dispersion compensation module, laserbeam stabilisation module, beam expander, angular dispersioncompensation module, etc.) may be provided for guiding the laser beam 14to the AO deflectors 16 and the objective 18, and for guiding the backscattered and/or the emitted fluorescent light to the detectors 20 as isknown in the art (see e.g. Katona et al. “Fast two-photon in vivoimaging with three-dimensional random-access scanning in large tissuevolumes”, Nature methods 9:201-208; 2012). Naturally, a laser scanningmicroscope 10 with a different structure may also be used.

The laser source 12 used for two-photon excitation may be a femtosecondpulse laser, e.g. a mode-locked Ti:S laser, which produces the laserbeam 14. In such a case the laser beam 14 consists of discrete laserpulses, which pulses have femtosecond pulse width and a repetitionfrequency in the MHz range.

Preferably a Faraday isolator is located in the optical path of thelaser beam 14, which prevents the reflection of the laser beam, therebyaiding smoother output performance. After passing through the Faradayisolator, the laser beam 14 preferably passes into a dispersioncompensation module, in which a pre-dispersion compensation is performedwith prisms in a known way. After this, the laser beam 14 preferablypasses through a beam stabilisation module, and a beam expander beforereaching the AO deflectors 16.

The laser beam 14 deflected by the AO deflectors 16 preferably passesthrough an angular dispersion compensation module for compensatingangular dispersion of the beam 14 as is known in the art. The objective18 focuses the laser beam 14 onto a sample 26 placed after the objective18. Preferably, a beam splitter is placed between the angular dispersioncompensation module and the objective 18, which transmits a part of thelaser beam 14 reflected from a sample 26 and or emitted by the sample 26and collected by the objective 18 to the photomultiplier (PMT) detectors20, as is known in the art.

According to the inventive method scanning points are extended to 3Dlines and/or surfaces and/or volume elements in order to substantiallyincrease the signal to noise ratio, which allows for performingmeasurements in vivo, e.g. in a moving brain.

The 3D drift AO scanning according to the invention allows not only forscanning individual points, but also for scanning along any segments ofany 3D lines situated in any location in the entire scanning volume.Therefore, any folded surface (or volume) elements can be generated, forexample from transversal or longitudinal lines as illustrated in FIG.1A. In this way, fluorescence information can be continuously collectedwhen scanning the entire 3D line in the same short period of time (≈20μs) as required for single-point scanning in the point-by-point scanningmode. Data acquisition rate is limited only by the maximal sampling rateof the PMT detectors 20.

It is therefore possible to generate folded surface elements with the 3Ddrift AO scanning technology in 3D, and fit them to any arbitraryscanning trajectory, e.g. long, tortuous dendrite segments and branchpoints in an orientation which minimizes fluorescence loss during brainmotion. This technique is referred to as 3D ribbon scanning (see FIG.2C).

To achieve 3D ribbon scanning, the first step is to select guidingpoints along a region of interest (e.g. a dendritic segment or any othercellular structure).

The second step is to fit a 3D trajectory to these guiding points usinge.g. piecewise cubic Hermite interpolation. Two preferred strategies toform ribbons along the selected 3D trajectory are to generate drifts(short scans during which the focus spot moves continuously) eitherparallel to the trajectory (longitudinal drifts), or orthogonal to thetrajectory (transverse drifts) as illustrated in FIG. 1A. In both cases,it is preferred to maximize how parallel these surface elements lie tothe plane of brain motion or to the nominal focal plane of theobjective. The basic idea behind the latter is that the point spreadfunction is elongated along the z axis: fluorescence measurements aretherefore less sensitive to motion along the z axis. Therefore, it isalso possible to follow this second strategy and generate multiple x-yframes for neuronal network and neuropil measurements (see below).

In the following, the implementation and efficiency of the differentscanning strategies will be demonstrated which can be performed by the3D drift AO scanning method according to the present invention.

Example 1: 3D Ribbon Scanning to Compensate In Vivo Motion Artifacts

To demonstrate 3D ribbon scanning we labelled a small portion ofpyramidal neurons in the V1 region of the visual cortex with a Ca²⁺sensor, GCaMP6f, using an AAV vector for delivery. Then, according tothe z-stack taken in advance, we selected guiding points and fitted the3D trajectory which covered a spiny dendritic segment of a labelledpyramidal cell (FIG. 1C). FIG. 1C shows a 3D image of a dendriticsegment of a selected GCaMP6f-labelled neuron. Cre-dependentGCaMP6f-expressing AAV vectors were used to induce sparse labelling. A3D ribbon (indicated with dashed lines) was selected for fast 3D driftAO scanning within the cuboid

We used transversal drifts to scan along the selected 3D ribbons tomeasure the selected 140 μm dendritic segment and spines with 70.1 Hz(FIG. 1D). Raw fluorescence data (raw) were measured along the selected3D ribbon and were projected into 2D along the longitudinal andtraversal axes of the ribbon following elimination of motion artifacts.Average Ca²⁺ responses along the ribbon during spontaneous activity(syn.) were colour coded. Using longitudinal drifts allowed a muchfaster measurement (in range of from 139.3 Hz to 417.9 Hz) of the samedendritic segment because fewer (but longer) 3D lines was required tocover the same ROI. In the next step, 3D recorded data were projectedinto 2D as a function of perpendicular and transversal distances alongthe surface of the ribbon. Note that, in this way, the dendritic segmentwas straightened to a frame (FIG. 1D) to record its activity in 2Dmovies. This projection also allowed the use of an adapted version ofprior art methods developed for motion artifact elimination in 2Dscanning (see Greenberg D S, Kerr J N (2009) Automated correction offast motion artifacts for two-photon imaging of awake animals. Journalof neuroscience methods 176:1-15).

The need to extend single scanning points to surface or volume elementsin order to preserve the surrounding fluorescence information for motionartifact elimination is also indicated by the fact that fluorescenceinformation could be completely lost during motion in behaving animalswhen using the point scanning method. FIG. 1B illustrates exemplifieddendritic and spine transients which were recorded using 3Drandom-access point scanning during motion (light) and rest (dark) fromone dendritic and one spine region of interest (ROI) indicated withwhite triangles in the inset. Note that fluorescence information canreach the background level in a running period, indicating that singlepoints are not sufficient to monitor activity in moving, behavinganimals.

FIGS. 2A-2H demonstrate the quantitative analysis of the motion artifactelimination capability of 3D drift AO scanning.

In order to quantify motion-induced errors and the efficiency of motionartifact correction during ribbon scanning, we first measured brainmovement by rapidly scanning a bright, compact fluorescence object whichwas surrounded by a darker background region. To do this, we centred asmall scanning volume, a cube, on the fluorescence object, anddisplacement was calculated from the x-y, x-z, and y-z projections whilethe examined mouse was running in a linear virtual maze. We separatedresting and moving periods according to the simultaneously recordedlocomotion information (FIGS. 2A and 2B). In the case of FIG. 2A brainmotion was recorded at 12.8 Hz by volume imaging a bright, compactfluorescent object which was surrounded by a darker region. FIG. 2Ashows exemplified transient of brain displacement projected on the xaxis from a 225 s measurement period when the mouse was running (light)or resting (dark) in a linear maze. Movement periods of thehead-restrained mice were detected by using the optical encoder of thevirtual reality system.

Displacement data were separated into two intervals according to therecorded locomotion information (running in light colour and resting indark colour) and a normalized amplitude histogram of brain motion wascalculated for the two periods (see FIG. 2B). Inset shows average andaverage peak-to-peak displacements in the resting and running periods.

FIG. 2C shows the normalized change in relative fluorescence amplitudeas a function of distance from the centre of GCaMP6f-labelled dendriticsegments (ΔF/F(x), mean±SEM, n=3). Dashed lines indicate averagepeak-to-peak displacement values calculated for the resting and runningperiods, respectively. Note the >80% drop in ΔF/F amplitude for theaverage displacement value during running. The inset shows a dendriticsegment example. ΔF/F was averaged along a dashed line and then the linewas shifted and averaging was repeated to calculate ΔF/F(x).

Brain motion can induce fluorescence artifacts, because there is aspatial inhomogeneity in baseline fluorescence and also in the relativefluorescence signals (FIG. 2C). The amplitude of motion-generatedfluorescence transients can be calculated by substituting the averagepeak-to-peak motion error into the histogram of the relativefluorescence change (FIG. 2C). The average ΔF/F(x) histogram wasrelatively sharp for dendrites (n=3, 100 μm long dendritic segments,FIG. 2C), therefore the average motion amplitude during runningcorresponds to a relatively large (80.1±3.1%, average of 150 crosssection) drop in the fluorescence amplitude, which is about34.4±15.6-fold higher than the average amplitude of a single AP-inducedCa²⁺ response. These data indicate the need for motion artifactcompensation.

On the left of FIG. 2D an image of a soma of a GCaMP6f-labelled neuroncan be seen. Points and dashed arrows indicate scanning points andscanning lines, respectively. On the right, FIG. 2D shows normalizedincrease in signal-to-noise ratio calculated for resting (dark) andrunning (light) periods in awake animals when scanning points wereextended to scanning lines in somatic recordings, as shown on the left.Signal-to-noise ratio with point-by-point scanning is indicated withdashed line.

FIG. 2E demonstrates similar calculations as in Fig. D, but fordendritic recordings. Signal-to-nose ratio of point-by-point scanning ofdendritic spines was compared to 3D ribbon-scanning during resting(dark) and running (light) periods. Note the more than 10-foldimprovement when using 3D ribbon scanning.

Next, we analyzed the efficiency of our methods for motion correctionduring in vivo measurements. As before, we labelled neurons and theirprocesses with a GCaMP6f sensor, used 3D ribbon scanning, and projectedthe recorded fluorescence data to movie frames. We got the best resultswhen each frame of the video recorded along 3D ribbons was corrected byshifting the frames at subpixel resolution to maximize the fluorescencecross correlation between the successive frames (FIG. 2F). On the leftof FIG. 2F exemplified individual Ca²⁺ transient can be seen from asingle dendritic spine derived from a movie which was recorded with 3Dribbon scanning along a 49.2 μm spiny dendritic segment in a behavingmouse (raw trace). When Ca²⁺ transients were derived followingmotion-artifact correction performed at pixel and sub-pixel resolution,the motion-induced artifacts were eliminated and signal-to-noise ratiowas improved.

Ribbon scanning and the successive frame shifts at subpixel resolutionin running animals increased signal-to-noise ratio by 7.56±3.14-fold(p>0.000015, n=10) as compared to 3D random-access point scanning (FIG.2G). FIG. 2G shows further examples for motion-artifact correction. Atthe top, a single frame can be seen from the movie recorded with 3Dribbon scanning from an awake mouse. At the bottom, exemplified Ca²⁺transients can be seen that are derived from the recorded movie framesfrom the color-coded regions. As can be seen the signal-to-noise ratioof the transients improved when they were derived followingmotion-artifact correction with subpixel resolution. On the right,signal-to-noise ratio can be seen of spine Ca²⁺ transients calculated(100 transients, n=5/5 spines/mice). Transients are shown without andwith motion correction at subpixel resolution.

Next we investigated separately the effect of the post-hoc frame shiftson the signal-to-nose ratio following ribbon scanning. Low-amplitudespine Ca²⁺ transients were barely visible when transients were derivedfrom the raw video. For a precise analytical analysis we added the same1, 2, 5, and 10 action-potential-induced average transients to theimages of a spiny dendritic segment and a soma. Then we generated frameseries by shifting each frame with the amplitude of brain motionrecorded in advance (similarly to FIG. 2A). Finally, we recalculatedCa²⁺ transients from the frame series with and without using themotion-correction algorithm, using ROIs at the same size to compare thesignal-to-noise ratio of point-by-point scanning and themotion-corrected 3D ribbon scanning on the same area. Our data indicatethat 3D ribbon scanning, which, in contrast to point-by-point scanning,allows motion correction, can largely improve the signal-to-noise ratioin the case of small, 1-5 AP-associated signals recorded most frequentlyduring in vivo measurements (11.33±7.92-fold, p>0.025, n=4 somata; n=100repeats for 1 AP), but the method also significantly improved thesignal-to-noise ratio of burst-associated and dendritic responses.Finally, we quantified the efficiency of our method in a “classical”behaviour experimental protocol. We simultaneously recorded multiplesomata of vasopressin-expressing intemeurons (VIP) during conditionedand unconditioned stimuli. Reward induced large responses inGCamP6f-labelled neurons whose Ca²⁺ signals temporally overlapped withthe behaviour induced motion and therefore Ca²⁺ transients wereassociated with large motion artefacts, even transients with negativeamplitude could have been generated. However, our method effectivelyimproved signal-to-noise ratio in these experiments (FIG. 2H). On theleft of FIG. 2H simultaneous 3D imaging of VIP neuron somata can be seenduring a classical behavior experiment where conditioned stimulus (waterreward) and unconditioned stimulus (air puff, not shown) were given fortwo different sounds. Exemplified somatic transients are shown with(light) and without motion correction at subpixel resolution (dark).Bottom diagram shows motion amplitude. Note that motion-induced andneuronal Ca²⁺ transients overlap. Moreover, transients could have anegative amplitude without motion correction. On the right,signal-to-noise ratio of the transients are shown with (light) andwithout (dark) motion correction (mean±SEM, n=3).

Example 2: Recording of Spiny Dendritic Segments with Multiple 3D RibbonScanning

Recently it has been reported that for many cortical neurons, synapticintegration occurs not only at the axon initial segment but also withinthe apical and basal dendritic tree. Here, dendritic segments formnon-linear computational subunits which also interact with each other,for example through local regenerative activities generated bynon-linear voltage-gated ion channels. However, in many cases, thedirect result of local dendritic computational events remains hidden insomatic recordings. Therefore, to understand computation in neuronalnetworks we also need novel methods for the simultaneous measurement ofmultiple spiny dendritic segments. Although previous studies havedemonstrated the simultaneous recording of multiple dendritic segmentsunder in vitro conditions, in vivo recording over large z-scanningranges has remained an unsolved problem because the brain movementgenerated by heartbeat, breathing, or physical motion has inhibited the3D measurement of these fine structures. Therefore, we implemented 3Dribbon scanning to simultaneously record the activity of multipledendritic segments illustrated in FIG. 3A.

As in the 3D measurement of single dendritic segments, we took a z-stackin advance, selected guiding points in 3D along multiple dendriticsegments, and fitted 3D trajectories and, finally, 3D ribbons to each ofthe selected dendritic segments (FIG. 3B). As above, the surface of theribbons was set to be parallel to the average motion vector of the brainto minimize the effect of motion artifacts. We selected 12 dendriticsegments from a GCaMP6f-labelled V1 pyramidal neuron for fast 3D ribbonscanning (FIG. 3B). FIG. 3B shows maximal intensity projection in thex-y and x-z plans of a GCaMP6f-labelled layer II/Ill pyramidal neuron.Numbered frames indicate the twelve 3D ribbons used to simultaneouslyrecord twelve spiny dendritic segments using 3D ribbon scanning. Whiteframes indicate the same spiny dendritic segments but on the x-zprojection.

In the next step, 3D data recorded along each ribbon were 2D projectedas a function of distance perpendicular to the trajectory and along thetrajectory of the given ribbon. Then, these 2D projections of thedendritic segments were ordered as a function of their length and wereplaced next to each other (FIG. 3C). At the top, fluorescence wasrecorded simultaneously along the 12 dendritic regions shown in FIG. 3B.Fluorescence data were projected into a 2D image as a function of thedistance along the longitudinal and transverse directions of eachribbon, then all images were ordered next to each other. Thistransformation allowed the simultaneous recording, successive motionartifact elimination, and visualization of the activity of the 12selected dendritic regions as a 2D movie. The top image is a singleframe from the movie recorded at 18.4 Hz. The inset is an enlarged viewof dendritic spines showing the preserved two-photon resolution. At thebottom, numbers indicate 132 ROIs: dendritic segments and spinesselected from the video. Note that, in this way, all the dendriticsegments are straightened and visualized in parallel. In this way we areable to transform and visualize 3D functional data in real-time as astandard video movie. The 2D projection used here allows fast motionartifact elimination and simplifies data storage, data visualization,and manual ROI selection.

Since each ribbon can be oriented differently in the 3D space, the localcoordinate system of measurements varies as a function of distance alonga given ribbon, and also between ribbons covering different dendriticsegments. Therefore, brain motion generates artifacts with differentrelative directions at each ribbon, so the 2D movement correctionmethods used previously cannot be used for the flattened 2D moviegenerated from ribbons. To solve this issue, we divided the recordingsof each dendritic region into short segments. Then the displacement ofeach 3D ribbon segment was calculated by cross-correlation, using thebrightest image as a reference. Knowing the original 3D orientation ofeach segment, the displacement vector for each ribbon segment could becalculated. Then we calculated the median of these displacement vectorsto estimate the net displacement of the recorded dendritic tree. Next,we projected back the net displacement vector to each ribbon segment tocalculate the required backshift for each image of each ribbon segmentfor motion elimination. Finally, we repeated the algorithm separately ineach and every segment to let the algorithm correct for localinhomogeneity in displacement. This allowed, for example, the depth-,and vasculature-, and distance-dependent inhomogeneities in displacementto be eliminated. Following this 3D to 2D transformation and motionartifact elimination, we were able to apply previously developed 2Dmethods to our 3D Ca²⁺ data to calculate regular Ca²⁺ transients from,for example, over 130 spines and dendritic regions (FIGS. 3C and D).Using our methods, we detected spontaneous and visualstimulation-induced activities (FIGS. 3D and 3F). In FIG. 3F transientswere induced by moving grating stimulation. Note the variability inspatial and temporal timing of individual spines. Finally, we generatedtwo raster plots from spine assembly patterns to demonstrate that bothsynchronous and asynchronous activities of dendritic spine assembliescan be recorded in behaving, moving animals (FIGS. 3E and 3G). In FIG.3G time of moving grating stimulation in eight different directions isindicated with a grey bar.

Example 3: Multi-Layer, Multi-Frame Imaging of Neuronal Networks:Chessboard Scanning

To understand neuronal computation, it is also important to record notonly assemblies of spines and dendrites, but also populations of somata.Random-access point scanning is a fast method which provides goodsignal-to-noise ratio for population imaging in in vitro measurementsand in anesthetized mouse models; however, point scanning generateslarge motion artifacts during recording in awake, behaving animals fortwo reasons. First, the amplitude of motion artifacts is at the level ofthe diameter of the soma. Second, baseline and relative fluorescence isnot homogeneous in space, especially when GECIs are used for labelling(FIG. 2C). Therefore, we need to detect fluorescence information notonly from a single point from each soma, but also from surroundingneighbouring ROIs, in order to preserve somatic fluorescence informationduring movement. To achieve this, we extended each scanning point tosmall squares, and in other sets of measurements (see below), to smallcubes. We can use the two main strategies described above to set theorientation of squares to be optimal for motion correction: namely, wecan set the squares to be either parallel to the direction of motion, orto be parallel to the nominal focal plane of the objective (FIG. 4A):this second strategy will be demonstrated here. FIG. 4B is a schematicperspective view of the selected scanning regions. Neurons from a mousein V1 region were labelled with GCaMP6f sensor. Neuronal somata andsurrounding background areas (small horizontal frames) were selectedaccording to a z-stack taken at the beginning of the measurements.Scalebars in FIG. 4B are 50 μm.

Similarly to 3D ribbon scanning, we can generate a 2D projection of the3D data during multi-layer, multi-frame recording, even during imageacquisition, by simply arranging all the squares, and hence each soma,into a “chessboard” pattern for better visualization and movie recording(this version of multi-layer, multi-frame imaging is called “chessboard”scanning. Similarly to the 3D ribbon scanning, here we calculated theaverage brain displacement vector as a function of time, and subtractedit from all frames to correct motion artifacts. Finally, we could selectsub-regions from the 2D projection and calculate the corresponding Ca²⁺transients as above (FIGS. 4C-D) and detect orientation and directionsensitive neurons with moving grating stimulation (FIG. 4E). In FIG. 4Cselected frames are “transformed” into a 2D “chessboard”, where the“squares” correspond to single somata. Therefore, the activity can berecorded as a 2D movie. The image shown in FIG. 4C is a single framefrom the video recording of 136 somata during visual stimulation. FIG.4D shows representative somatic Ca²⁺ responses derived from thecolour-coded regions in FIG. 4C following motion-artifact compensation.FIG. 4E shows raster plot of average Ca²⁺ responses induced with movinggrating stimulation into eight different directions from the colourcoded neurons shown in FIG. 4C.

Multi-layer, multi-frame scanning combines the advantage of lowphototoxicity of low-power temporal oversampling (LOTOS) with thespecial flexibility of the 3D scanning capability of AO microscopy byallowing simultaneous imaging along multiple small frames placed inarbitrary locations in the scanning volume with speeds greater thanresonant scanning.

Multi-Layer, Multi-Frame Imaging of Long Neuronal Processes

Multi-layer, multi-frame scanning can also be used to measure neuronalprocesses (FIG. 4F). FIG. 4F shows the schematic of the measurement.Multiple frames in different size and at any position in the scanningvolume can be used to capture activities. Because the total z-scanningrange with GECIs was extended to over 650 μm, we can, for example,simultaneously image apical and basal dendritic arbors of layer II/Illor V neurons, or follow the activity of dendritic trees in thisz-scanning range. To demonstrate the large dendritic imaging range, weselected a GCaMP6f-labelled layer V neuron from a sparsely labelled V1network (FIG. 4G). FIG. 4H shows the x-z projection of the neuron shownin FIG. 4G. Visual stimulation-induced dendritic and somatic Ca²⁺responses were simultaneously imaged at 30 Hz in multiple framessituated at 41 different depth levels in over a 500 μm z range in anawake animal (FIG. 4H). Colour-coded frames indicated in FIG. 4G showthe position of the simultaneously imaged squares. Motion artifacts wereeliminated from frames as above by subtracting the time-dependent netdisplacement vector providing a motion correction with subpixelresolution. Finally, we derived the Ca²⁺ transients for each ROI (seeFIG. 4I). Transients were induced by moving gratings stimulation in timeperiods shown in gray.

Naturally, the multi-layer, multi-frame scanning method is not limitedto a single dendrite of a single neuron, but rather we cansimultaneously image many neurons with their dendritic (or axonal)arbor. FIG. 5A shows a 3D view of a layer II/III neuron labelled withthe GCaMP6f sensor. Rectangles indicate four simultaneously imagedlayers (ROI 1-4). Numbers indicate distances from the pia matter.Neurons were labelled in the V1 region using sparse labelling. Somataand neuronal processes of the three other GCamP6f labelled neuronssituated in the same scanning volume were removed from the z-stack forclarity. We selected four layers of neuropil using a nonspecific AAVvector and recorded activity with 101 Hz simultaneously in four layers.FIG. 5B shows average baseline fluorescence in the four simultaneouslymeasured layers shown in FIG. 5A. Numbers in the upper right cornerindicates imaging depth from the pia matter. In FIG. 5C, representativeCa²⁺ transients were derived from the numbered yellow sub-regions shownin FIG. 5B following motion artifact elimination. Responses were inducedby moving grating stimulation into three different directions at thetemporal intervals indicated with gray shadows. In FIG. 5D the averagedbaseline fluorescence images from FIG. 5B are shown on gray scale andwere overlaid with the color-coded relative Ca²⁺ changes (ΔF/F). To showan alternative quantitative analysis, we also calculated Ca²⁺ transients(FIG. 5C) from some exemplified somatic and dendritic ROIs (FIG. 5B).

Volume Scanning with Multi-Cube and Snake Scanning

Our data demonstrated that, even though the brain moves along all threespatial dimensions, we could still preserve fluorescence information andeffectively eliminate motion artifacts by scanning at reduceddimensions, along surface elements, in 3D. However, under somecircumstances, for example in larger animals or depending on the surgeryor behavioral protocols, the amplitude of motion can be larger and themissing third scanning dimension cannot be compensated for. Tosufficiently preserve fluorescence information even in these cases, wecan take back the missing scanning dimension by extending the surfaceelements to volume elements by using an automatic algorithm until wereach the required noise elimination efficiency for measurements. Todemonstrate this in two examples, we extended 3D ribbons to foldedcuboids (called “snake scanning”, FIG. 6A) and multi-frames tomulti-cuboids. FIG. 6A shows schematic of the 3D measurement. 3D ribbonsselected for 3D scanning can be extended to 3D volume elements (3D“snakes”) to completely involve dendritic spines, parent dendrites, andthe neighbouring background volume to fully preserve fluorescenceinformation during brain movement in awake, behaving animals. FIG. 6B isa z projection of a spiny dendritic segment of a GCaMP6f-labelled layerII/Ill neuron selected from a sparsely labelled V1 region of the cortexfor snake scanning (FIG. 6B). Selected dendritic segment is shown at anenlarged scale. According to the z-stack taken at the beginning, weselected guiding points, interpolated a 3D trajectory, and generated a3D ribbon which covered the whole segment as described above. Then weextended the ribbon to a volume, and performed 3D snake scanning fromthe selected folded cuboid (FIGS. 6A-D). In FIG. 6C three dimensionalCa²⁺ responses were induced by moving grating stimulation and wereprojected into 2D as a function of distances along the dendrite andalong one of the perpendicular directions. Fast snake scanning wasperformed at 10 Hz in the selected dendritic region shown in FIG. 6B.Fluorescence data were projected as a function of the distance along thelongitudinal and the transverse directions, and then data weremaximal-intensity-projected along the second (and orthogonal)perpendicular axis to show average responses for three moving directionsseparately and, together, following motion correction. Alternatively, wecould avoid maximal intensity projection to a single plane bytransforming the folded snake form into a regular cube. FIG. 6D showsthe same dendritic segment as in FIG. 6C, but the 3D volume is shown asx-y and z-y plane projections. Representative spontaneous Ca²⁺ responseswere derived from the coded sub-volume elements correspond to dendriticspines and two dendritic regions. Transients were derived from thesub-volume elements following 3D motion correction at subpixelresolution. In this representation, Ca²⁺ transients could be calculatedfrom different sub-volumes (FIG. 6D). Note that, due to the preservedgood spatial resolution, we can clearly separate each spine from eachother and from the mother dendrite in moving animals. Therefore, we cansimultaneously record and separate transients from spines even when theyare located in the hidden and overlapping positions which are requiredto precisely understand dendritic computation (FIG. 6D).

FIG. 6E shows a schematic perspective illustration of the 3D multi-cubescanning. To demonstrate the multi-cube imaging, we simply extendedframes to small cubes and added a slightly larger z dimension than thesum of the z diameter of somata and the peak z movement to preserve allsomatic fluorescence points during motion. FIG. 6F shows volume-renderedimage of 10 representative cubes selecting individual neuronal somatafor simultaneous 3D volume imaging. Simultaneous measurements of the tenGCaMP6f-labelled somata were performed from 8.2 Hz up to 25.2 Hz usingrelatively large cubes, the size of which was aligned to the diameter ofthe somata (each cube was in the range from 46×14×15 voxels to 46×32×20voxels, where one voxel was 1.5 μm×3 μm×4 μm and 1.5 μm×1.5 μm×4 μm).This spatial and temporal resolution made it possible to resolve thesub-cellular Ca²⁺ dynamic. We can further increase the scanning speed orthe number of recorded cells inversely with the number of 3D drifts usedto generate the cubes. For example, 50 somata can be recorded with 50 Hzwhen using cubes made of 50×10=5 voxels. Similarly to multi-framerecordings, ROIs can be ordered next to each other for visualization(FIG. 5F). In FIG. 6G Ca²⁺ transients were derived from the 10 cubesshown in FIG. 6F. As above, here we calculated the net displacementvector and corrected sub-volume positions at each time point duringcalculation of the Ca²⁺ transient in order to eliminate motion. We foundthat the use of volume scanning reduced the amplitude of motionartifacts in Ca²⁺ transient by 19.28±4.19-fold during large-amplitudemovements in behaving animals. These data demonstrated that multi-cubeand snake scanning can effectively be used for the 3D measurement ofneuronal networks and spiny dendritic segments in multiple sub-volumesdistributed over the whole scanning volume. Moreover, these methods arecapable of completely eliminating large-amplitude motion artifacts.

Multi-3D Line Scanning

In the previous section, we extended one-dimensional scanning points totwo- or three-dimensional objects. In this section, we extend scanningpoints along only one dimension to perform measurements at a higherspeed. We found that, in many experiments, sample movement is small, andbrain motion can be approximated with a movement along a single 3Dtrajectory (FIG. 7B). FIG. 7A shows a schematic perspective illustrationof multi-3D line scanning. Each scanning line is associated with onespine. In this case, we can extend each point of 3D random-access pointscanning to only multiple short 3D lines instead of multiple surface andvolume elements (FIG. 7A). In the first step we selected points from thez-stack. In the second step, we recorded brain motion to calculate theaverage trajectory of motion. In FIG. 7B amplitude of brain motion wasrecorded in 3D using three perpendicular imaging planes and a brightfluorescence object as in FIG. 2A. Average motion direction is shown inthe z projection image of the motion trajectory. In the third step, wegenerated short 3D lines with 3D drift AO scanning to each pre-selectedpoint in such a way that the centre of the lines coincided with thepre-selected points, and the lines were set to be parallel to theaverage trajectory of motion (FIGS. 7B and 7C). FIG. 7C shows zprojection of a layer 2/3 pyramidal cell, labelled with GCaMP6f. Wesimultaneously detected the activity of 169 spines along the 3D lines(FIGS. 7C and E). White lines indicate the scanning line running throughthe 164 pre-selected spines. All scanning lines were set to be parallelto the average motion shown in FIG. 7B. The corresponding 3D Ca²⁺responses recorded simultaneously along the 164 spines. In FIG. 7D asingle raw Ca²⁺ response is recorded along 14 spines using Multi-3D linescanning. Note the movement artifacts in the raw fluorescence. FIG. 7Eshows exemplified spine Ca²⁺ transients induced by moving gratingstimulation in four different directions indicated at the bottom wererecorded using point-by-point scanning (left) and multi-3D line scanning(right).

FIG. 7F shows selected Ca²⁺ transients measured using point scanning(left) and multi-3D line scanning (right). If we switched back from themulti-3D line scanning mode to the classical 3D point-by-point scanningmode, oscillations induced by heartbeat, breathing, and physical motionappeared immediately in transients (FIG. 7F). These data showed animprovement in the signal-to-noise ratio when multi-3D line scanning wasused. In cases when the amplitude of the movement is small and mostlyrestricted to a 3D trajectory, we can effectively use multi-3D linescanning to rapidly record over 160 dendritic spines in behavinganimals.

Advantage of the Different Scanning Modes

Above we presented a novel two-photon microscope technique, 3D drift AOscanning, with which we have generated six novel scanning methods: 3Dribbon scanning; chessboard scanning; multi-layer, multi-frame imaging;snake scanning; multi-cube scanning; and multi-3D line scanning shown inFIG. 8. Points, lines, surface and volume elements illustrate the ROIsselected for measurements.

Each of these scanning methods is optimal for a differentneurobiological aim and can be used alone or in any combination for the3D imaging of moving samples in large scanning volumes. Our methodallows, for the first time, high-resolution 3D measurements of neuronalnetworks at the level of tiny neuronal processes, such as spinydendritic segments, in awake, behaving animals, even under conditionswhen large-amplitude motion artifacts are generated by physicalmovement.

The above described novel laser scanning methods for 3D imaging usingdrift AO scanning methods have different application fields based on howthey are suited to different brain structures and measurement speed. Thefastest method is multi-3D line scanning, which is as fast as randomaccess point-by-point scanning (up to 1000 ROIs with 53 kHz per ROI) andcan be used to measure spines or somata (FIG. 8). In the second groupmulti-layer, multi-frame imaging, chessboard scanning, and 3D ribbonscanning can measure up to 500 ROIs with 5.3 kHz per ROI along longneuronal processes and somata. Finally, the two volume scanning methods,multi-cube scanning and snake scanning, allow measurement of up to50-100 volume elements up to about 1.3 kHz per volume element, and areideal for measuring somata and spiny dendritic segments, respectively.The two volume scanning methods provide the best noise eliminationcapability because fluorescence information can be maximally preserved.Finally, we quantified how the improved signal-to-noise ratio of the newscanning strategies improves single AP resolution from individual Ca²⁺transients when a large number of neurons was simultaneously recorded inthe moving brain of behaving animals. Chessboard scanning, multi-cubescanning, or multi-layer, multi-frame imaging in behaving animalsimproved the standard deviation of the Ca²⁺ responses with a factor of14.89±1.73, 14.38±1.67, and 5.55±0.65, respectively, (n=20) as comparedto 3D random-access point scanning. Therefore the standard deviation ofthe motion artifact corrected Ca²⁺ responses became smaller than theaverage amplitude of single APs, which made single action potentialdetection available in neuronal network measurements in behavinganimals. This was not possible with 3D random-access AO microscopy,because the standard deviation of Ca²⁺ responses was 4.85±0.11-foldhigher than the amplitude of single APs when the animal was running.

EXPERIMENTAL PROCEDURE

Surgical Procedure

All experimental protocols for the above described methods were carriedout on mice. The surgical process was similar to that describedpreviously (Katona et al. “Fast two-photon in vivo imaging withthree-dimensional random-access scanning in large tissue volumes”,Nature methods 9:201-208; 2012); Fast two-photon in vivo imaging withthree-dimensional random-access scanning in large tissue volumes. Naturemethods 9:201-208) with some minor modifications, briefly: mice wereanesthetized with a mixture of midazolam, fentanyl, and medetomidine (5mg, 0.05 mg and 0.5 mg/kg body weight, respectively); the V1 region ofthe visual cortex was localized by intrinsic imaging (on average 0.5 mmanterior and 1.5 mm lateral to the lambda structure); a round craniotomywas made over the V1 using a dental drill, and was fully covered with adouble cover glass, as described previously (see Goldey G J, Roumis D K,Glickfeld L L, Kerlin A M, Reid R C, Bonin V, Schafer D P, Andermann M L(2014); Removable cranial windows for long-term imaging in awake mice.Nature protocols 9:2515-2538). For two-photon recordings, mice wereawakened from the fentanyl anesthesia with a mixture of nexodal,revetor, and flumazenil (1.2 mg, 2.5 mg, and 2.5 mg/kg body weight,respectively) and kept under calm and temperature-controlled conditionsfor 2-12 minutes before the experiment. Before the imaging sessions, themice were kept head-restrained in dark under the 3D microscope for atleast 1 hour to accommodate to the setup. In some of the animals, asecond or third imaging session was carried out after 24 or 48 hours,respectively.

AAV Labeling

The V1 region was localized with intrinsic imaging, briefly: the skinwas opened and the skull over the right hemisphere of the cortex wascleared. The intrinsic signal was recorded using the same visualstimulation protocol we used later during the two-photon imagingsession. The injection procedure was performed as described previously(Chen T W, Wardill T J, Sun Y, Pulver S R, Renninger S L, Baohan A,Schreiter E R, Kerr R A, Orger M B, Jayaraman V, Looger L L, Svoboda K,Kim D S (2013); Ultrasensitive fluorescent proteins for imaging neuronalactivity. Nature 499:295-300) with some modifications. A 0.5 mm hole wasopened in the skull with the tip of a dental drill over the V1 corticalregion (centered 1.5 mm lateral and 1.5 mm posterior to the bregma). Theglass micro-pipette (tip diameter ≈10 μm) used for the injections wasback-filled with 0.5 ml vector solution (≈6×10¹³ particles/ml) theninjected slowly (20 nl/s for first 50 nl, and with 2 nl/s for theremaining quantity) into the cortex, at a depth of 400 μm under the pia.For population imaging we used AAV9.Syn.GCaMP6s.WPRE.SV40 orAAV9.Syn.Flex.GCaMP6f.WPRE.SV40 (in the case of Thy-1-Cre and VIP-Creanimals); both viruses were from Penn Vector Core, Philadelphia, Pa. Forsparse labeling we injected the 1:1 mixture ofAAV9.Syn.Flex.GCaMP6f.WPRE.SV40 and AAVI.hSyn.Cre.WPRE.hGH diluted10,000 times. The cranial window was implanted 2 weeks after theinjection over the injection site, as described in the surgicalprocedure section.

DISCUSSION

There are a number of benefits of the new 3D drift AO scanning methodsin neuroscience: i) it enables a scanning volume, with GECIs more thantwo orders of magnitude larger than previous realizations, while thespatial resolution remains preserved; ii) it offers a method of fast 3Dscanning in any direction, with an arbitrary velocity, without anysampling rate limitation; iii) it makes it possible to add surface andvolume elements while keeping the high speed of the recording; iv) itcompensates fast motion artifacts in 3D to preserve high spatialresolution, characteristic to two-photon microscopy, during 3D surfacescanning and volume imaging even in behaving animals; and v) it enablesgeneralization of the low-power temporal oversampling (LOTOS) strategyof 2D raster scanning in fast 3D AO measurements to reducephototoxicity.

These technical achievements enabled the realization of the followingfast 3D measurements and analysis methods in behaving, moving animals:i) simultaneous functional recording of over 150 spines; ii) fastparallel imaging of activity of over 12 spiny dendritic segments; iii)precise separation of fast signals in space and time from eachindividual spine (and dendritic segment) from the recorded volume, whichsignals overlap with the currently available methods; iv) simultaneousimaging of large parts of the dendritic arbor and neuronal networks in az scanning range of over 650 μm; v) imaging a large network of over 100neurons with subcellular resolution in a scanning volume of up to 500μm×500 μm×650 μm with the signal-to-noise ratio more than an order ofmagnitude larger than for 3D random-access point scanning; and vi)decoding APs with over 10-fold better single AP resolution in neuronalnetwork measurements.

The limits of understanding of neural processes lie now at the fastdendritic and neuronal activity patterns occurring in living tissue in3D, and their integration over larger network volumes. Until now, theseaspects of neural circuit function have not been measured in awake,behaving animals. Our new 3D scanning methods, with preserved highspatial and temporal resolution, provide the missing tool for theseactivity measurements. Among other advantages, we will be able to usethese methods to investigate spike-timing-dependent plasticity and theunderlying mechanisms, the origin of dendritic regenerative activities,the propagation of dendritic spikes, receptive field structures,dendritic computation between multiple spiny and aspiny dendriticsegments, spatiotemporal clustering of different input assemblies,associative learning, multisensory integration, the spatial and temporalstructure of the activity of spine, dendritic and somatic assemblies,and function and interaction of sparsely distributed neuronalpopulations, such as parvalbumin-, somatostatin-, and vasoactiveintestinal polypeptide-expressing neurons. These 3D scanning methods mayalso provide the key to understanding synchronization processes mediatedby neuronal circuitry locally and on a larger scale: these are thoughtto be important in the integrative functions of the nervous system or indifferent diseases. Importantly, these complex functional questions canbe addressed with our methods at the cellular and sub-cellular level,and simultaneously at multiple spiny (or aspiny) dendritic segments, andat the neuronal network level in behaving animals.

Imaging Brain Activity During Motion

Two-dimensional in vivo recording of spine Ca²⁺ responses have alreadybeen realized in anaesthetized animals and even in running animals, butin these papers only a few spines were recorded with a relatively lowsignal-to-nose ratio. However, fast 2D and 3D imaging of large spineassemblies and spiny dendritic segments in awake, running, and behavinganimals has remained a challenge. Yet this need is made clear by recentwork showing that the neuronal firing rate more than doubles in mostneurons during locomotion, suggesting a completely altered neuronalfunction in moving, behaving animals. Moreover, the majority of neuronalcomputation occurs in distant apical and basal dendritic segments whichform complex 3D arbors in the brain. However, none of the previous 2Dand 3D imaging methods have been able to provide access to these complexand thin (spiny) dendritic segments during running periods, or indifferent behavioral experiments, despite the fact that complexbehavioral experiments are rapidly spreading in the field ofneuroscience. One reason is that, in a typical behavioral experiment,motion-induced transients have similar amplitude and kinetic asbehavior-related Ca²⁺ transients. Moreover, these transients typicallyappear at the same time during the tasks, making their separationdifficult. Therefore, the 3D scanning methods demonstrated here, aloneor in different combinations, will add new tools that have long beenmissing from the toolkit of neurophotonics for recording dendriticactivity in behaving animals.

Compensation of Movement of the Brain

Although closed-loop motion artifact compensation, with three degrees offreedom, has already been developed at low speed (≈10 Hz), theefficiency of the method has not been demonstrated in awake animals, orin dendritic spine measurements, or at higher speeds than thosecharacteristic of motion artefacts. Moreover, due to the complexarachnoidal suspension of the brain, and due to the fact that bloodvessels generate spatially inhomogeneous pulsation in their localenvironment, the brain also exhibits significant deformation, not merelytranslational movements and, therefore, the amplitude of displacementcould be different in each and every sub-region imaged. This is crucialwhen we measure small-amplitude somatic responses (for example single ora few AP-associated responses) or when we want to measure smallstructures such as dendritic spines. Fortunately, our 3D imaging and thecorresponding analysis methods also allow compensation with variableamplitude and direction in each sub-region imaged, meaning thatinhomogeneous displacement distributions can therefore be measured andeffectively compensated in 3D.

The efficiency of our 3D scanning and motion artifact compensationmethods is also validated by the fact that the standard deviation ofindividual somatic Ca² transients was largely reduced (up to 14-fold),and became smaller than the amplitude of a single AP, especially whenmulti-cube or chessboard scanning was used. This allows single APresolution in the moving brain of behaving animals using the currentlyfavored GECI, GCaMP6f. The importance of providing single AP resolutionfor neuronal network imaging has also been validated by recent workswhich demonstrated that in many systems neuronal populations codeinformation with single APs instead of bursts.

Simultaneous 3D Imaging of Apical and Basal Dendritic Arbor

Recent data have demonstrated that the apical dendritic tuft of corticalpyramidal neurons is the main target of feedback inputs, where they areamplified by local NMDA spikes to reach the distal dendritic Ca²⁺ and,finally, the somatic sodium integration points where they meet basalinputs also amplified by local NMDA spikes. Therefore, the majority oftop-down and bottom-up input integration occurs simultaneously at localintegrative computational subunits separated by distances of severalhundred micrometers, which demands the simultaneous 3D imaging ofneuronal processes in a several hundred micrometer z-range. The maximal,over 1000 μm z scanning range of AO microscopy, which is limited duringin vivo measurements with GECIs to about 650 μm by the maximal availablepower of the currently available lasers, already permitted simultaneousmeasurement of apical and basal dendritic segments of layer II/IIIneurons and dendritic segments of a layer V neurons in an over 500 μmrange.

Although 2D imaging in anesthetized animals can capture long neuronalprocesses, the location of horizontally oriented long segments is almostexclusively restricted to a few layers (for example to layer I), and inall other regions we typically see only the cross-section or shortsegments of obliquely or orthogonally oriented dendrites. Moreover, evenin cases when we luckily capture multiple short segments with a singlefocal plane, it is impossible to move the imaged regions along dendritesand branch points to understand the complexity of spatiotemporalintegration. The main advantage of the multi-3D ribbon and snakescanning methods is that any ROI can be flexibly selected, shifted,tilted, and aligned to the ROIs without any constraints; therefore,complex dendritic integration processes can be recorded in a spatiallyand temporally precise manner.

Deep Scanning

Although several great technologies have been developed for fast 3Drecordings, imaging deep layer neurons is possible only by eithercausing mechanical injury or using single-point two-photon orthree-photon excitation which allows fluorescence photons scattered fromthe depth to be collected. Using adaptive optics and regenerativeamplifiers can improve resolution and signal-to-noise ratio at depth.Moreover, using GaAsP photomultipliers installed directly in theobjective arms can itself extend the in vivo scanning range to over 800μm. One of the main perspectives of the 3D scanning methods demonstratedhere is that the main limitation to reach the maximal scanning ranges ofover 1.6 mm is the relatively low laser intensity of the currentlyavailable lasers which cannot compensate for the inherent losses in thefour AO deflectors. Supporting this over a 3 mm z-scanning range hasalready been demonstrated with 3D AO imaging in transparent sampleswhere intensity and tissue scattering is not limiting. Therefore in thefuture novel, high-power lasers in combination with fast adaptive opticsand new red shifted sensors may allow a much larger 3D scanning range tobe utilized which will, for example, permit the measurement of theentire arbor of deep-layer neurons or 3D hippocampal imaging, withoutremoving any parts from the cortex.

Although there are several different arrangements of passive opticalelements and the four AO deflectors with which we can realizemicroscopes for fast 3D scanning, all of these microscopes use driftcompensation with counter-propagating AO waves at the second group ofdeflectors, and therefore the scanning methods demonstrated here can beeasily implemented in all 3D AO microscope. Moreover, at the expense ofa reduced scanning volume, 3D AO microscopes could be simplified andused as an upgrade in any two-photon systems. Hence we anticipate thatour new methods will open new horizons in high-resolution in vivoimaging in behaving animals.

3D Drift AO Scanning

In the following, we briefly describe how to derive a one-to-onerelationship between the focal spot coordinates and speed, and the chirpparameters of the four AO deflectors to move the focal spot along any 3Dline, starting at any point in the scanning volume.

In order to determine the relationship between the driver frequencies ofthe four AO deflectors and the x, y and z coordinates of the focal spot,we need the simplified transfer matrix model of the 3D microscope. Our3D AO system is symmetric along the x and y coordinates, because it isbased on two x and two y cylindrical lenses, which are symmetricallyarranged in the x-z and y-z planes. We therefore need to calculate thetransfer matrix for one plane, for example for the x-z plane. The firstand second x deflectors of our 3D scanner are in a conjugated focalplane, as they are coupled with an afocal projection lens consisting oftwo achromatic lenses. For the simplicity, therefore, we can use them injuxtaposition during the optical calculations.

As shown in FIG. 9, in our paraxial model we use two lenses with F₁ andF₂ focal distances at a distance of F₁+F₂ (afocal projection) to imagethe two AO deflectors (AOD x₁ and AOD x₂) to the objective.F_(objective) is the focal length of the objective, z_(x) defines thedistance of the focal spot from the objective lens along the z-axis, andt₁ and t₂ are distances between the AO deflector and the first lens ofthe afocal projection, and between the second lens and the objective,respectively.

The geometrical optical description of the optical system can beperformed by the ABCD matrix technique. The angle (α₀) and position (x₀)of the output laser beam of any optical system can be calculated fromthe angle (α) and position (x) of the incoming laser beam using the ABCDmatrix of the system (Equation S1):

$\begin{matrix}{\begin{pmatrix}x_{0} \\\alpha_{0}\end{pmatrix} = {A*\begin{pmatrix}x \\\alpha\end{pmatrix}}} & \left\lbrack {{Equation}\mspace{14mu} 1} \right\rbrack\end{matrix}$

The deflectors deflecting along x and y directions are also linked byoptical systems that can be also modelled paraxially using the ABCDmatrix system. To make difference from the optical system betweenscanner and sample we can denote it by small letters (a b c d). In thisway we can determine for each ray passing at a coordinate x₁ in thefirst crystal (deflecting along the x axis) the coordinate x₂ and angleα₂ taken in the second crystal:

$\begin{matrix}{\begin{pmatrix}x_{2} \\\alpha_{2}\end{pmatrix} = {\begin{pmatrix}a & b \\c & d\end{pmatrix}*\begin{pmatrix}x_{1} \\\alpha_{1}\end{pmatrix}}} & \left\lbrack {{Equation}\mspace{14mu} 2} \right\rbrack\end{matrix}$The link between the second deflector and the sample plane is given by:

$\begin{matrix}{\begin{pmatrix}x_{0} \\\alpha_{0}\end{pmatrix} = {\begin{pmatrix}A & B \\C & D\end{pmatrix}*\begin{pmatrix}x_{2} \\\alpha_{2^{\prime}}\end{pmatrix}}} & \left\lbrack {{Equation}\mspace{14mu} 3} \right\rbrack\end{matrix}$

Here the α₂′ is the angle of the ray leaving the crystal afterdeflection. The relation between α₂ and α₂′ is determined by thedeflection rule of the second deflector. The simplest approximationsimply gives:α₂′=α₂ +K*f ₂  [Equation 4]

where K is a proportionality factor between a relative angle deflection(α) following the acousto-optic deflector and the local acousticfrequency (f), according to the following equation:∝=K*fIf the acousto-optic deflectors are the same, then K is the same for allfour deflectors, if different deflectors are used then the deflectorsare characterized by different K proportionality factors and equationsfor any given deflector should be calculated using the K proportionalityfactor of the given deflector. In the following equations sameacousto-optic deflectors are considered resulting in uniform Kproportionality factors, however a skilled person can readily usedifferent K proportionality factors if the applied deflectors aredifferent.

Applying the second matrix transform we get:x ₀(t)=A*x ₂ +B*α ₂′(x ₂ ,t)=A*x ₂ +B*(α₂(x ₂ ,t)+K*f ₂(x ₂,t))  [Equation 5]Applying the first matrix transfer, that between the two deflectors:x ₀(t)=A*(a*x ₁ +b*α ₁(x ₁ ,t))+B*(c*x ₁ +d*α ₁(x ₁ ,t)+K*f ₂(x ₂ ,t))  [Equation 6]Applying the deflection rule of deflector 1:α₁(x ₁ ,t)=K*f ₁(x ₁ ,t)  [Equation 7]we get for the targeted sample coordinates:x ₀(t)=A*(a*x ₁ +b*K*f ₁(x ₁ ,t))+B*(c*x ₁ +d*K*f ₁(x ₁ ,t)+K*f ₂(x ₂,t))   [Equation 8]In the last step we eliminate x₂ from the equation:x ₀(t)=A*(a*x ₁ +b*K*f ₁(x ₁ ,t))+B*(c*x ₁ +d*K*f ₁(x ₁ ,t)+K*f ₂(a*x ₁+b*K*f ₁(x ₁ ,t),t))  [Equation 9]The x and t dependence of the frequencies in the two deflectors can bedescribed by the equations:

$\begin{matrix}{{f_{1}\left( {x_{1},t} \right)} = {{f_{1}\left( {0,0} \right)} + {{a_{x\; 1}(t)}*\left( {t - \frac{D}{2*v_{a}} - \frac{x_{1}}{v_{a}}} \right)}}} & \left\lbrack {{Equation}\mspace{14mu} 10} \right\rbrack \\{{f_{2}\left( {x_{2},t} \right)} = {{f_{2}\left( {0,0} \right)} + {{a_{x\; 2}(t)}*\left( {t - \frac{D}{2*v_{a}} - \frac{x_{2}}{v_{a}}} \right)}}} & \left\lbrack {{Equation}\mspace{14mu} 11} \right\rbrack\end{matrix}$With these the x₀ coordinate:x ₀(t)=(A*a+B*c)*x ₁+(A*b*K+B*d*K)*f ₁(x ₁ ,t))+B*(K*f ₂(a*x ₁ +b*K*f₁(x ₁ ,t),t))  [Equation 12]When substituting the frequencies:

$\begin{matrix}{{x_{0}(t)} = {{\left( {{A*a} + {B*c}} \right)*x_{1}} + {\left( {{A*b*K} + {B*d*K}} \right)*\left( {{f_{1}\left( {0,0} \right)} + {{a_{x\; 1}(t)}*\left( {t - \frac{D}{2*v_{a}} - \frac{x_{1}}{v_{a}}} \right)}} \right)} + {B*\left( {K*\left( {{f_{2}\left( {0,0} \right)} + {{a_{x\; 2}(t)}*\left( {t - \frac{D}{2*v_{a}} - \frac{\left( {{a*x_{1}} + {b*K*\left( {{f_{1}\left( {0,0} \right)} + {{a_{x\; 1}(t)}*\left( {t - \frac{D}{2*v_{a}} - \frac{x_{1}}{v_{a}}} \right)}} \right)}} \right)}{\left( v_{a} \right)}} \right)}} \right)} \right)}}} & \left\lbrack {{Equation}\mspace{14mu} 13} \right\rbrack\end{matrix}$we get the form of the equation that depends only on x₁ and t.Now we can collect the expressions of the coefficients of the x₁containing terms:

$\begin{matrix}{{{The}\mspace{14mu}{linear}\mspace{14mu} x_{1}\mspace{14mu}{term}\mspace{14mu}{coefficient}\text{:}}{{A*a} + {B*c} - \frac{\begin{matrix}{{A*K*b*{a_{x\; 1}(t)}} +} \\{{K*B*a*{a_{x\; 2}(t)}} + {K*B*{a_{x\; 1}(t)}*d}}\end{matrix}}{v_{a}} + \frac{{a_{x\; 1}(t)}*{a_{x\; 2}(t)}*b*B*K^{2}}{v_{a}^{2}}}} & \left\lbrack {{Equation}\mspace{14mu} 14} \right\rbrack\end{matrix}$This can be made zero quite simply if the coefficients a_(x1) and a_(x2)do not depend on t. In this case we have a simple linear frequency sweepin both deflectors, and a drifting focal spot with constant velocity,when the parameters a_(x1) and a_(x2) fulfill the condition put by theequation:

$\begin{matrix}{{{A*a} + {B*c} - \frac{\begin{matrix}{{A*K*b*{a_{x\; 1}(t)}} +} \\{{K*B*a*{a_{x\; 2}(t)}} + {K*B*{a_{x\; 1}(t)}*d}}\end{matrix}}{v_{a}} + \frac{{a_{x\; 1}(t)}*{a_{x\; 2}(t)}*b*B*K^{2}}{v_{a}^{2}}} = 0} & \left\lbrack {{Equation}\mspace{14mu} 15} \right\rbrack\end{matrix}$The x₀ coordinate will have the temporal change:

$\begin{matrix}{\mspace{79mu}{{{x_{0}(t)} = {{x_{0}(0)} + {v_{x}*t}}}\mspace{79mu}{{with}\text{:}}}} & \left\lbrack {{Equation}\mspace{14mu} 16} \right\rbrack \\{v_{x} = {{A*K*b*a_{x\; 1}} + {K*B*a_{x\; 2}} + {K*B*a_{x\; 1}*d} - {\frac{B*K^{2}*a_{x\; 1}*a_{x\; 2}*b}{v_{a}}\mspace{14mu}{and}}}} & \left\lbrack {{Equation}\mspace{14mu} 17} \right\rbrack \\{{x\; 0(0)} = {{B*K*f\; 2\left( {0,0} \right)} + {A*K*b*f\; 1\left( {0,0} \right)} + {B*K*d*f\; 1\left( {0,0} \right)} - {B*D*K*\frac{a_{x\; 2}}{2*v_{a}}} - \frac{B*K^{2}*a_{x\; 2}*b*f\; 1\left( {0,0} \right)}{v_{a}} - \frac{A*D*K*a_{x\; 1}*b}{2*v_{a}} - \frac{B*D*K*a_{x\; 1}*d}{2*v_{a}} + \frac{B*D*K^{2}*{a._{x\; 1}}*a_{x\; 2}*b}{2*v_{a}^{2}}}} & \left\lbrack {{Equation}\mspace{14mu} 18} \right\rbrack\end{matrix}$

It is possible to determine the parameters by inverting the aboveequations, starting from the desired v_(x) and x₀(0) values. It ishowever more complicated, when one wants to move the spot along curvesthat implies not only constant linear velocity but also acceleration. Toachieve this, the a_(x1) and a_(x2) parameters must depend on t in thiscase. The most simple dependence is linear

$\begin{matrix}{{a_{x\; 1}(t)} = {c_{x\; 1} + {b_{x\; 1}*\left( {t - \frac{D}{2*v_{a}} - \frac{x_{1}}{v_{a}}} \right)}}} & \left\lbrack {{Equation}\mspace{14mu} 19} \right\rbrack\end{matrix}$and for the second deflector

$\begin{matrix}{{a_{x\; 2}(t)} = {c_{x\; 2} + {b_{x\; 2}*\left( {t - \frac{D}{2*v_{a}} - \frac{x_{2}}{v_{a}}} \right)}}} & \left\lbrack {{Equation}\mspace{14mu} 20} \right\rbrack\end{matrix}$Again using the relation between x₂ and x₁:

$\begin{matrix}{{a_{x2}(t)} = {c_{x2} + {b_{x\; 2}*\left( {t - \frac{D}{2*v_{a}} - \frac{{a*x_{1}} + {b*K*{f_{1}\left( {x_{1},t} \right)}}}{v_{a}}} \right)}}} & \left\lbrack {{Equation}\mspace{14mu} 21} \right\rbrack\end{matrix}$Substituting this into the equation of x₀, we get:

$\begin{matrix}{{x_{0}(t)} = {{\left( {{A*a} + {B*c}} \right)*x_{1}} + {\left( {{A*b*K} + {B*d*K}} \right)*\left( {{f_{1}\left( {0,0} \right)} + {\left( {c_{x\; 1} + {b_{x\; 1}*\left( {t - \frac{D}{2*v_{a}} - \frac{x_{1}}{v_{a}}} \right)}} \right)*\left( {t - \frac{D}{2*v_{a}} - \frac{x_{1}}{v_{a}}} \right)}} \right)} + {B*\left( {K*\left( {{f_{2}\left( {0,0} \right)} + {\left( {c_{x\; 2} + {b_{x\; 2}*\left( {t - \frac{D}{2*v_{a}} - \frac{{a*x_{1}} + {b*K*\left( {{f_{1}\left( {0,0} \right)} + {\left( {c_{x\; 1} + {b_{x\; 1}*\left( {t - \frac{D}{2*v_{a}} - \frac{x_{1}}{v_{a}}} \right)}} \right)*\left( {t - \frac{D}{2*v_{a}} - \frac{x_{1}}{v_{a}}} \right)}} \right)}}{v_{a}}} \right)}} \right)*\left( {t - \frac{D}{2*v_{a}} - \frac{{a*x_{1}} + {b*K*\left( {{f_{1}\left( {0,0} \right)} + {\left( {c_{x\; 1} + {b_{x\; 1}*\left( {t - \frac{D}{2*v_{a}} - \frac{x_{1}}{v_{a}}} \right)}} \right)*\left( {t - \frac{D}{2*v_{a}} - \frac{x_{1}}{v_{a}}} \right)}} \right)}}{v_{a}}} \right)}} \right)} \right)}}} & \left\lbrack {{Equation}\mspace{14mu} 22} \right\rbrack\end{matrix}$Here x₀ depends only on x₁ and t. To obtain the compact focal spot allx₁ dependent terms have to vanish. There are four terms, that havelinear, quadratic, cubic and fourth power dependence, and all aredepending on t, in the general case. We have to select special cases tofind solutions that can be described analytically, since the generalcase is too complicated.

The general equation 22 can be applied to different optical setups usingthe particular applicable variables for the matrix elements.

In an exemplary embodiment all deflectors are optically linked bytelescopes composed by different focal length lenses.

The general matrix for a telescope linking two deflectors 1 and 2,composed of two lenses—lens 1 and 2—with focal lengths f₁ and f₂ placedat distance t from each other, lens 1 placed at distance d₁ fromdeflector 1 and lens 2 placed at distance d₂ from deflector 2:

$\begin{matrix}{\mspace{635mu}{{{Equation}\mspace{14mu} 23}{\begin{pmatrix}a & b \\c & d\end{pmatrix} = \begin{pmatrix}{1 - \frac{d_{2}}{f_{2}} - \frac{d_{2} + {t*\left( {1 - \frac{d_{2}}{f_{2}}} \right)}}{f_{1}}} & \begin{matrix}{d_{1} + t + d_{2} - \frac{d_{2}*t}{f_{2}} - \frac{d_{2}*d_{1}}{f_{2}} -} \\{\frac{d_{2}*d_{1}}{f_{1}} - \frac{t*d_{1}}{f_{1}} + \frac{d_{2}*d_{1}*t}{f_{1}*f_{2}}}\end{matrix} \\{- \frac{f_{1} + f_{2} - t}{f_{1}*f_{2}}} & \frac{\begin{matrix}{{{- d_{1}}*f_{1}} + {f_{2}*f_{1}} - {t*}} \\{f_{1} - {f_{2}*d_{1}} + {d_{1}*t}}\end{matrix}}{f_{2}*f_{1}}\end{pmatrix}}}} & \;\end{matrix}$If in ideal case of a telescope the lenses are placed at a distancef₁+f₂ from each other for optical imaging, the matrix reduces to:

$\begin{matrix}{\begin{pmatrix}a & b \\c & d\end{pmatrix} = \begin{pmatrix}\frac{- f_{2}}{f_{1}} & {f_{2} - \frac{d_{1}*f_{2}}{f_{1}} - \frac{\left( {d_{2} - f_{2}} \right)*f_{1}}{f_{2}}} \\0 & \frac{- f_{1}}{f_{2}}\end{pmatrix}} & {{Equation}\mspace{14mu} 24}\end{matrix}$In the system of the mentioned reference the deflectors are all put atconjugate image planes of the intermediate telescopes. Most efficientimaging with a telescope is performed between the first focal plane ofthe first lens—meaning f₁=d₁ and the second focal plane of the secondlens, f₂=d₂.In this case the matrix reduces to:

$\begin{matrix}{\begin{pmatrix}a & b \\c & d\end{pmatrix} = \begin{pmatrix}\frac{- f_{2}}{f_{1}} & 0 \\0 & \frac{- f_{1}}{f_{2}}\end{pmatrix}} & {{Equation}\mspace{14mu} 25}\end{matrix}$If the two focal lengths are equal we get the simplest relation:

$\begin{matrix}{\begin{pmatrix}a & b \\c & d\end{pmatrix} = \begin{pmatrix}{- 1} & 0 \\0 & {- 1}\end{pmatrix}} & {{Equation}\mspace{14mu} 26}\end{matrix}$Between each deflector of the analyzed system either of the matricesfrom Equations 23-26 can be applied to get the appropriate matrixelements to describe equation 22. If the deflectors deflecting along thex and y axes are positioned alternately, e.g. one x is followed by oney, the telescopes linking the two x direction (x₁ and x₂) and ydirection (y₁ and y₂) deflectors are described by the multiplication ofthe matrices describing the x₁ and x₂ and y₁ and y₂ deflectorsrespectively. Here we neglect the propagation through the defectors (ofnegligible length compared to the distances d₁, f₁, etc.) and considerthat the y deflectors do not modify the propagation angles in the x-zplane and vice versa x directing deflectors have not influence in they-z plane. Hence using e.g. equation 24 we get for the telescopes formedby lenses of focal lengths f₁ and f₂ linking the x₁ and y₁ deflectorsand lenses of focal lengths f₃ and f₄ linking the y₁ and x₂ deflectors:

$\begin{matrix}{\begin{pmatrix}a & b \\c & d\end{pmatrix} = \begin{pmatrix}{\frac{f_{2}}{f_{1}}*\frac{f_{4}}{f_{3}}} & \frac{\begin{matrix}{{d_{1}*f_{2}^{2}*f_{3}^{2}} + {d_{2}*f_{1}^{2}*f_{3}^{2}} + {d_{3}*f_{2}^{2}*}} \\{f_{4}^{2} + {d_{4}*f_{2}^{2}*f_{3}^{2}} - {f_{1}*f_{2}^{2}*f_{3}^{2}} -} \\{{f_{2}*f_{1}^{2}*f_{3}^{2}} - {f_{3}*f_{2}^{2}*f_{4}^{2}} - {f_{4}*f_{2}^{2}*f_{3}^{2}}}\end{matrix}}{f_{1}*f_{2}*f_{3}*f_{4}} \\0 & {\frac{f_{2}}{f_{1}}*\frac{f_{4}}{f_{3}}}\end{pmatrix}} & {{Equation}\mspace{14mu} 27}\end{matrix}$If the focal lengths f₁=f₂ and f₃=f₄,we get the simplest matrix:

$\begin{matrix}{\begin{pmatrix}a & b \\c & d\end{pmatrix} = \begin{pmatrix}1 & 0 \\0 & 1\end{pmatrix}} & {{Equation}\mspace{14mu} 28}\end{matrix}$The optical transfer between the last deflector and the targeted sampleplane will be different for the deflectors deflecting along x and y. Theoptical system linking the last x deflector to the sample plane containsalso the telescope between x₂ and y₂ deflectors made of the lenses withfocal lengths f₃′ and f₄′, the distance between deflector x₂ and lensf₃′ being d₃′, that between lenses f₃′ and f₄′ being f₃′+f₄′, and thatbetween f₄′ and deflector y₂ being d₄′. The optical system betweendeflector y₂ and the targeted sample plane consists of three lenses withfocal lengths F₁, F₂ and F_(obj), the distances between the elementsbeing respectively: t₁, F₁+F₂, t₂, z_(x)=z_(y) starting from deflectory₂. Hence the complete transfer between x₂ and the sample plane isdescribed by:

$\begin{matrix}{\begin{pmatrix}A_{x} & B_{x} \\C_{x} & D_{x}\end{pmatrix} = {\begin{pmatrix}1 & z_{x} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & 0 \\\frac{- 1}{F_{obj}} & 1\end{pmatrix}\begin{pmatrix}1 & t_{2} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & 0 \\\frac{- 1}{F_{2}} & 1\end{pmatrix}\begin{pmatrix}1 & {F_{1} + F_{2}} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & 0 \\\frac{- 1}{F_{1}} & 1\end{pmatrix}\begin{pmatrix}1 & t_{1} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & d_{4}^{\prime} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & 0 \\\frac{- 1}{f_{4}^{\prime}} & 1\end{pmatrix}\begin{pmatrix}1 & {f_{3}^{\prime} + f_{4}^{\prime}} \\0 & 1\end{pmatrix}*\begin{pmatrix}1 & 0 \\\frac{- 1}{f_{3}^{\prime}} & 1\end{pmatrix}\begin{pmatrix}1 & d_{3}^{\prime} \\0 & 1\end{pmatrix}}} & {{Equation}\mspace{14mu} 29}\end{matrix}$and that between y₂ and sample plane is:

$\begin{matrix}{\begin{pmatrix}A_{y} & B_{y} \\C_{y} & D_{y}\end{pmatrix} = {\begin{pmatrix}1 & z_{y} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & 0 \\\frac{- 1}{F_{obj}} & 1\end{pmatrix}\begin{pmatrix}1 & t_{2} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & 0 \\\frac{- 1}{F_{2}} & 1\end{pmatrix}\begin{pmatrix}1 & {F_{1} + F_{2}} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & 0 \\\frac{- 1}{F_{1}} & 1\end{pmatrix}\begin{pmatrix}1 & t_{1} \\0 & 1\end{pmatrix}}} & {{Equation}\mspace{14mu} 30}\end{matrix}$The latter can be written in closed form:

$\begin{matrix}{\begin{pmatrix}A_{y} & B_{y} \\C_{y} & D_{y}\end{pmatrix} = {\begin{pmatrix}{{{- \frac{F_{2}}{F_{obj}F_{1}}}\left( {F_{obj} - z_{y}} \right)},} & {F_{1} + F_{2} - {\left( {F_{1} + F_{2}} \right)\frac{z_{y}}{F_{obj}}} - \frac{F_{2}t_{1}}{F_{1}} - \frac{F_{1}t_{2}}{F_{2}} - \frac{F_{1}z_{y}}{F_{2}} + {\frac{z_{y}}{F_{obj}}\left( {\frac{F_{2}t_{1}}{F_{1}} + \frac{F_{1}t_{2}}{F_{2}}} \right)}} \\{\frac{F_{2}}{F_{1}F_{obj}},} & {\frac{F_{2}t_{1}}{F_{1}F_{obj}} - {\frac{F_{1}}{F_{2}F_{obj}}\left( {F_{2} + F_{obj} - t_{2}} \right)} - \frac{F_{2}}{F_{obj}}}\end{pmatrix}.}} & {{Equation}\mspace{14mu} 31}\end{matrix}$The values a, b, c, d and A, B, C, D of the matrices can be used inequations like Equation 22 to determine temporal variations of the x₀and y₀ coordinates of the focal.In another embodiment, the deflectors are placed in the orderx₁-x₂-y₁-y₂, without intermediate telescopes or lenses. The distancesbetween the deflectors are d₁,d₂ and d₃ respectively, starting formdeflector x₁. Here the thicknesses of the deflectors cannot be neglectedrelative to the distances between them, their optical thicknesses(refractive index times physical thickness) are denoted by tx₁, tx₂,ty₁, ty₂, respectively. The optical transfer matrix linking thedeflectors x₁ and x₂ is:

$\begin{matrix}{\begin{matrix}{\begin{pmatrix}a_{x} & b_{x} \\c_{x} & d_{x}\end{pmatrix} = {\begin{pmatrix}1 & \frac{{tx}_{2}}{2} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & {d\; 1} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & \frac{{tx}_{1}}{2} \\0 & 1\end{pmatrix}}} \\{= \begin{pmatrix}1 & {d_{1} + \frac{{tx}_{1}}{2} + \frac{{tx}_{2}}{2}} \\0 & 1\end{pmatrix}}\end{matrix}\quad} & {{Equation}\mspace{14mu} 32}\end{matrix}$and that between y₁ and y₂:

$\begin{matrix}{\begin{matrix}{\begin{pmatrix}a_{y} & b_{y} \\c_{y} & d_{y}\end{pmatrix} = {\begin{pmatrix}1 & \frac{{ty}_{2}}{2} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & {d\; 3} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & \frac{{ty}_{1}}{2} \\0 & 1\end{pmatrix}}} \\{= \begin{pmatrix}1 & {d_{3} + \frac{{ty}_{1}}{2} + \frac{{ty}_{2}}{2}} \\0 & 1\end{pmatrix}}\end{matrix}\quad} & {{Equation}\mspace{14mu} 33}\end{matrix}$The optical system between the deflector y₂ and the sample plane is thesame as in the previously analyzed microscope, formed by three lenses offocal lengths F₁, F₂ and F_(obj), placed at the same distances asbefore.Therefore the ABCD matrix in the y-z plane is the multiplication of thatgiven in Equation 31, and propagation through the half of deflector y₂:

$\begin{matrix}{\begin{pmatrix}A_{y} & B_{y} \\C_{y} & D_{y}\end{pmatrix} = {\begin{pmatrix}{{{- \frac{F_{2}}{F_{obj}F_{1}}}\left( {F_{obj} - z_{y}} \right)},} & \begin{matrix}{F_{1} + F_{2} - {\left( {F_{1} + F_{2}} \right)\frac{z_{y}}{F_{obj}}} - \frac{F_{2}t_{1}}{F_{1}} -} \\{\frac{F_{1}t_{2}}{F_{2}} - \frac{F_{1}z_{y}}{F_{2}} + {\frac{z_{y}}{F_{obj}}\left( {\frac{F_{2}t_{1}}{F_{1}} + \frac{F_{1}t_{2}}{F_{2}}} \right)}}\end{matrix} \\{\frac{F_{2}}{F_{1}F_{obj}},} & {\frac{F_{2}t_{1}}{F_{1}F_{obj}} - {\frac{F_{1}}{F_{2}F_{obj}}\left( {F_{2} + F_{obj} - t_{2}} \right)} - \frac{F_{2}}{F_{obj}}}\end{pmatrix}*\begin{pmatrix}1 & \frac{{ty}_{2}}{2} \\0 & 1\end{pmatrix}}} & {{Equation}\mspace{14mu} 34}\end{matrix}$but the multiplicative matrix can usually be neglected, since ty₂ isusually much smaller than F₁, F₂, etc.The ABCD matrix in the x-z plane must take into account the propagationthrough the deflectors y₁ and y₂ and the distances between them.

$\begin{matrix}{\begin{pmatrix}A_{y} & B_{y} \\C_{y} & D_{y}\end{pmatrix} = {\begin{pmatrix}1 & z_{y} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & 0 \\\frac{- 1}{F_{obj}} & 1\end{pmatrix}\begin{pmatrix}1 & t_{2} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & 0 \\\frac{- 1}{F_{2}} & 1\end{pmatrix}\begin{pmatrix}1 & {F_{1} + F_{2}} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & 0 \\\frac{- 1}{F_{1}} & 1\end{pmatrix}\begin{pmatrix}1 & t_{1} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & {ty}_{2} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & d_{3} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & {ty}_{1} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & d_{2} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & \frac{{tx}_{2}}{2} \\0 & 1\end{pmatrix}}} & {{Equation}\mspace{14mu} 35}\end{matrix}$These matrix elements will be asymmetric in the x-z and y-z planes,hence the parameters determining the x₀ and y₀ coordinates of the focalspot must be computed separately.We realized a system—Katona et al.—that contains less elements than themicroscope of Reddy et al., but uses telescope between deflectors x₁, y₁and x₂, y₂, to avoid asymmetry appearing in the system of Tomas et al.expressed by Equations 34 and 35. The telescope between the twodeflector pairs is formed by two lenses of equal focal length, placed attwice of the focal length from each other. The telescope performsperfect imaging between deflectors x₁ and x₂ and deflectors y₁ and y₂,respectively.The thicknesses of the deflectors can be neglected compared to the focallengths of the intermediate telescope lens and compared to the focallengths F₁, F₂ and distances t₁, t₂.With these approximations, assuming ideal imaging we get for the (a b cd) matrix for both deflector pairs:

$\begin{matrix}{\begin{pmatrix}a & b \\c & d\end{pmatrix} = \begin{pmatrix}{- 1} & 0 \\0 & {- 1}\end{pmatrix}} & \left\lbrack {{Equation}\mspace{14mu} 36} \right\rbrack\end{matrix}$The ABCD transfer matrix of the system part shown in FIG. 9 thattransfers the rays from the output plane of the second deflector to thefocal plane of the objective can be calculated according to Equation 31,since the optical system is the same:

$\begin{matrix}{\begin{pmatrix}A & B \\C & D\end{pmatrix} = {\begin{pmatrix}1 & z_{x} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & 0 \\\frac{- 1}{F_{obj}} & 1\end{pmatrix}\begin{pmatrix}1 & t_{2} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & 0 \\\frac{- 1}{F_{2}} & 1\end{pmatrix}\begin{pmatrix}1 & {F_{1} + F_{2}} \\0 & 1\end{pmatrix}\begin{pmatrix}1 & 0 \\\frac{- 1}{F_{1}} & 1\end{pmatrix}\begin{pmatrix}1 & t_{1} \\0 & 1\end{pmatrix}}} & \left\lbrack {{Equation}\mspace{14mu} 37} \right\rbrack\end{matrix}$

The product of the matrixes is quite complicated in its general form, itis the same as in Equation 31, but the same for both x and ycoordinates, with z_(x)=z_(y)

$\begin{matrix}{\begin{pmatrix}A & B \\C & D\end{pmatrix} = \begin{pmatrix}{{{- \frac{F_{2}}{F_{obj}F_{1}}}\left( {F_{obj} - z_{x}} \right)},} & {F_{1} + F_{2} - {\left( {F_{1} + F_{2}} \right)\frac{z_{x}}{F_{obj}}} - \frac{F_{2}t_{1}}{F_{1}} - \frac{F_{1}t_{2}}{F_{2}} - \frac{F_{1}z_{x}}{F_{2}} + {\frac{z_{x}}{F_{obj}}\left( {\frac{F_{2}t_{1}}{F_{1}} + \frac{F_{1}t_{2}}{F_{2}}} \right)}} \\{\frac{F_{2}}{F_{1}F_{obj}},} & {\frac{F_{2}t_{1}}{F_{1}F_{obj}} - {\frac{F_{1}}{F_{2}F_{obj}}\left( {F_{2} + F_{obj} - t_{2}} \right)} - \frac{F_{2}}{F_{obj}}}\end{pmatrix}} & {{Equation}\mspace{14mu} 38}\end{matrix}$

However, we can use the simplification below, considering that theafocal optical system produces the image of the deflector output planeon the aperture of the objective lens, with the ideal telescope imaging.In this case, t₁=F₁ and t₂=F₂. With this simplification we get

$\begin{matrix}{\begin{pmatrix}A & B \\C & D\end{pmatrix} = \begin{pmatrix}{{{- \frac{F_{2}}{F_{obj}F_{1}}}\left( {F_{obj} - z_{x}} \right)},} & {- \frac{F_{1}z_{x}}{F_{2}}} \\{\frac{F_{2}}{F_{1}F_{obj}},} & {- \frac{F_{1}}{F_{2}}}\end{pmatrix}} & \left\lbrack {{Equation}\mspace{14mu} 39} \right\rbrack\end{matrix}$

Using this matrices in Equation 36 and 39 we can calculate the angle(α₀) and coordinate (x₀) of any output ray in the x-z plane at a given zdistance (z_(x)) from the objective from the angle (α) and position (x)taken in the plane of the last AO deflector. The same calculation can beused for the y-z plane. The x₀ coordinate is given in general form byEquation 22, where we now insert the (abcd) matrix elements fromEquation 36, and replace x₁ by x, representing the x coordinate in thefirst deflector

$\begin{matrix}{{x_{0}(t)} = {{\left( {- A} \right)*x} - {\left( {B*K} \right)*\left( {{f_{1}\left( {0,0} \right)} + {\left( {c_{x\; 1} + {b_{x\; 1}*\left( {t - \frac{D}{2*v_{a}} - \frac{x}{v_{a}}} \right)}} \right)*\left( {t - \frac{D}{2*v_{a}} - \frac{x}{v_{a}}} \right)}} \right)} + {B*\left( {K*\left( {{f_{2}\left( {0,0} \right)} + {\left( {c_{x\; 2} + {b_{x\; 2}*\left( {t - \frac{D}{2*v_{a}} + \frac{x}{v_{a}}} \right)}} \right)*\left( {t - \frac{D}{2*v_{a}} + \frac{x}{v_{a}}} \right)}} \right)} \right)}}} & \left\lbrack {{Equation}\mspace{14mu} 40} \right\rbrack\end{matrix}$

We replace the matrix elements A and B also, from Equation 39:

$\begin{matrix}{{x_{0}(t)} = {{\left( {\frac{F_{2}}{F_{obj}F_{1}}\left( {F_{obj} - z_{x}} \right)} \right)*x} + {\left( {\frac{F_{1}z_{x}}{F_{2}}*K} \right)*\left( {{f_{1}\left( {0,0} \right)} + {\left( {c_{x\; 1} + {b_{x\; 1}*\left( {t - \frac{D}{2*v_{a}} - \frac{x}{v_{a}}} \right)}} \right)*\left( {t - \frac{D}{2*v_{a}} - \frac{x}{v_{a}}} \right)}} \right)} - {\frac{F_{1}z_{x}}{F_{2}}*\left( {K*\left( {{f_{2}\left( {0,0} \right)} + {\left( {c_{x\; 2} + {b_{x\; 2}*\left( {t - \frac{D}{2*v_{a}} + \frac{x}{v_{a}}} \right)}} \right)*\left( {t - \frac{D}{2*v_{a}} + \frac{x}{v_{a}}} \right)}} \right)} \right)}}} & \left\lbrack {{Equation}\mspace{14mu} 41} \right\rbrack\end{matrix}$

After same transformations and simplifications we get:

$\begin{matrix}{{x_{0}(t)} = {{{- \frac{F_{2}}{F_{obj}F_{1}}}\left( {F_{obj} - z_{x}} \right)*x} - {\frac{F_{1}z_{x}}{F_{2}}*K*\left( {{f_{1}\left( {0,0} \right)} - {f_{2}\left( {0,0} \right)} + {b_{x\; 1}*\left( {t - \frac{D}{2v_{a}} - \frac{x}{v_{a}}} \right)^{2}} - {b_{x\; 2}*\left( {t - \frac{D}{2v_{a}} + \frac{x}{v_{a}}} \right)^{2}} + {c_{x\; 1}*\left( {t - \frac{D}{2v_{a}} - \frac{x}{v_{a}}} \right)} - {c_{x\; 2}*\left( {t - \frac{D}{2v_{a}} + \frac{x}{v_{a}}} \right)}} \right)}}} & \left\lbrack {{Equation}\mspace{14mu} 42} \right\rbrack\end{matrix}$

Expanding the terms in brackets, we get separate x- and t-dependentparts:

$\begin{matrix}{{x_{0}(t)} = {{{- \frac{F_{1}z_{x}}{F_{2}}}*K*\left( {b_{x\; 1} - b_{x\; 2}} \right)*\left( {t - \frac{D}{2v_{a}}} \right)^{2}} - {\frac{F_{1}z_{x}}{F_{2}}*K*\left( {b_{x\; 1} - b_{x\; 2}} \right)*\left( \frac{x}{v_{a}} \right)^{2}} + {\left( {{{- \frac{F_{2}}{F_{obj}F_{1}}}\left( {F_{obj} - z_{x}} \right)} - {\frac{F_{1}z_{x}}{F_{2}}*K*\left\lbrack {{{- 2}*\left( {b_{x\; 1} + b_{x\; 2}} \right)*\left( {t - \frac{D}{2v_{a}}} \right)*\frac{1}{v_{a}}} - {\left( {c_{x\; 1} + c_{x\; 2}} \right)*\frac{1}{v_{a}}}} \right\rbrack}} \right)*x} + {\frac{F_{1}z_{x}}{F_{2}}*K*\left( {{f_{1}\left( {0,0} \right)} - {f_{2}\left( {0,0} \right)} + {\left( {c_{x\; 1} - c_{x\; 2}} \right)*\left( {t - \frac{D}{2v_{a}}} \right)}} \right)}}} & \left\lbrack {{Equation}\mspace{14mu} 43} \right\rbrack\end{matrix}$

To provide ideal focusing, in a first assumption, the time-dependent and-independent terms in the x-dependent part of the x₀ coordinate shouldvanish separately for all t values. To have the beam focused, the termscontaining x² and x must vanish for any x value. This implies twoequations instead of only one:

$\begin{matrix}{{{{- \frac{F_{2}}{F_{obj}F_{1}}}\left( {F_{obj} - z_{x}} \right)} + {K\;\frac{F_{1}z_{x}}{F_{2}}\frac{c_{x\; 1} + c_{x\; 2}}{v_{a}}} + {2*K\;\frac{F_{1}z_{x}}{F_{2}}\frac{b_{x\; 1} + b_{x\; 2}}{v_{a}}*\left( {t - \frac{D}{2v_{a}}} \right)}} = {0\mspace{14mu}{and}\text{:}}} & \left\lbrack {{Equation}\mspace{14mu} 44} \right\rbrack \\{\mspace{76mu}{{K\;\frac{F_{1}z_{x}}{F_{2}}\frac{b_{x\; 1} - b_{x\; 2}}{v_{a}^{2}}} = 0}} & \left\lbrack {{Equation}\mspace{14mu} 45} \right\rbrack\end{matrix}$

The second implies that b_(x1)=b_(x2)=b_(x). This also implies that thefirst term on the right side in Equation 43, the single that containsthe term depending on t², vanishes. Hence we have an x₀ coordinatemoving with constant velocity. If this happens at constant z, which isnot time dependent, and b_(x1)=b_(x2)=0, we get back to the simplelinear temporal slope of the acoustic frequencies.

From Equation 44 we can express the time-dependence of the z coordinate:

$\begin{matrix}{{z_{x}(t)} = \frac{\frac{F_{2}}{F_{1}}}{\frac{F_{2}}{F_{obj}F_{1}} + {K\;\frac{{F_{1}c_{x\; 1}} + c_{x\; 2}}{F_{2}\mspace{14mu} v_{a}}} + {4*K\;\frac{F_{1}b_{x}}{F_{2}v_{a}}*\left( {t - \frac{D}{2v_{a}}} \right)}}} & \left\lbrack {{Equation}\mspace{14mu} 46} \right\rbrack\end{matrix}$

We will treat separately the cases when the z_(x) coordinate isconstant, hence the focal spot drifts within the horizontal x-y plane(see below example I); and when the spot moves along arbitrary 3D linespossibly following the axes of the structures that are measured—e.g.axons, dendrites, etc. (example II).

Example I: The z_(x) Coordinate does not Depend on Time

In this case, b_(x1)=b_(x2)=0 as we can see from Equations 45 and 46.(above).

From Equation 46, we also see that the focal plane is constant:

$\begin{matrix}{z_{x} = \frac{\frac{F_{2}}{F_{1}}}{\frac{F_{2}}{F_{obj}F_{1}} + {K\;\frac{{F_{1}c_{x\; 1}} + c_{x\; 2}}{F_{2}\mspace{14mu} v_{a}}}}} & \left\lbrack {{Equation}\mspace{14mu} 47} \right\rbrack\end{matrix}$

If we set a desired z_(x) plane, we get for the following relationshipbetween the required c_(x1) and c_(x2) parameters:

$\begin{matrix}{{c_{x\; 1} + c_{x\; 2}} = {v_{a}\frac{F_{2}^{2}}{K*z_{x}*F_{obj}F_{1}^{2}}\left( {F_{obj} - z_{x}} \right)}} & \left\lbrack {{Equation}\mspace{14mu} 48} \right\rbrack\end{matrix}$

The temporal variation of the x₀ coordinate in this case is given by:

$\begin{matrix}{{x_{0}(t)} = {{- \frac{F_{1}z_{x}}{F_{2}}}*K*\left( {{f_{1}\left( {0,0} \right)} - {f_{2}\left( {0,0} \right)} + {\left( {c_{x\; 1} - c_{x\; 2}} \right)*\left( {t - \frac{D}{2v_{a}}} \right)}} \right)}} & \left\lbrack {{Equation}\mspace{14mu} 49} \right\rbrack\end{matrix}$

If we replace z_(x) with its expression from Equation 47, we get for thex₀ coordinate:

$\begin{matrix}{{x_{0}(t)} = {{- \frac{F_{1}}{F_{2}}}*\frac{\frac{F_{2}}{F_{1}}}{\frac{F_{2}}{F_{obj}F_{1}} + {K\;\frac{{F_{1}c_{x\; 1}} + c_{x\; 2}}{F_{2}\mspace{14mu} v_{a}}}}*K*\left( {{f_{1}\left( {0,0} \right)} - {f_{2}\left( {0,0} \right)} + {\left( {c_{x\; 1} - c_{x\; 2}} \right)*\left( {t - \frac{D}{2\; v_{a}}} \right)}} \right)}} & \left\lbrack {{Equation}\mspace{14mu} 50} \right\rbrack\end{matrix}$

after simplification to:

$\begin{matrix}{{x_{0}(t)} = {{- \frac{K}{\frac{F_{2}}{F_{obj}F_{1}} + {K\;\frac{{F_{1}c_{x\; 1}} + c_{x\; 2}}{F_{2}\mspace{14mu} v_{a}}}}}*\left( {{f_{1}\left( {0,0} \right)} - {f_{2}\left( {0,0} \right)} + {\left( {c_{x\; 1} - c_{x\; 2}} \right)*\left( {t - \frac{D}{2v_{a}}} \right)}} \right)}} & \left\lbrack {{Equation}\mspace{14mu} 51} \right\rbrack\end{matrix}$

We express the initial velocity and acceleration of the focal spot alongthe x₀ coordinate:

$\begin{matrix}{v_{x\; 0} = {{- \frac{K}{\frac{F_{2}}{F_{obj}F_{1}} + {K\;\frac{{F_{1}c_{x\; 1}} + c_{x\; 2}}{F_{2}\mspace{14mu} v_{a}}}}}*\left( \left( {c_{x\; 1} - c_{x\; 2}} \right) \right)}} & \left\lbrack {{Equation}\mspace{14mu} 52} \right\rbrack\end{matrix}$

further simplified:

$\begin{matrix}{v_{x\; 0} = {{- \frac{K*z_{x}*F_{1}}{F_{2}}}*\left( \left( {c_{x\; 1} - c_{x\; 2}} \right) \right)\mspace{14mu}{and}\text{:}}} & \left\lbrack {{Equation}\mspace{14mu} 53} \right\rbrack \\{a_{x\; 0} = {{{- \frac{4K}{\frac{F_{2}}{F_{obj}F_{1}} + {K\;\frac{{F_{1}c_{x\; 1}} + c_{x\; 2}}{F_{2}\mspace{14mu} v_{a}}}}}*\left( b_{x\; 1} \right)} = 0}} & \left\lbrack {{Equation}\mspace{14mu} 54} \right\rbrack\end{matrix}$

The last equation shows that in the x-z plane the focal spot cannot beaccelerated; it drifts with constant velocity v_(x0), which is the samefor the duration of the frequency chirp's. When we want to calculate thevalues of the required frequency slopes to get a moving focal pointcharacterized by the following parameters: starting x coordinate x₀,distance from the objective z_(x), velocity along the x axis v_(x0), weneed to use the expression for c_(x1)+c_(x2) (Equation 48) andc_(x1)-c_(x2) (Equation 53).

For c_(x1) and c_(x2) we get:

$\begin{matrix}{{c_{x\; 1} - c_{x\; 2}} = {\frac{- F_{2}}{K*F_{1}*z_{x}}\left( v_{x\; 0} \right)}} & \left\lbrack {{Equation}\mspace{14mu} 55} \right\rbrack \\{{c_{x\; 1} + c_{x\; 2}} = {v_{a}\frac{F_{2}^{2}}{K*z_{x}*F_{obj}*F_{1}^{2}}\left( {F_{obj} - z_{x}} \right)}} & \left\lbrack {{Equation}\mspace{14mu} 56} \right\rbrack\end{matrix}$

Adding and subtracting the above two equations, we get the results:

$\begin{matrix}{c_{x\; 1} = {\frac{- F_{2}}{2*K*F_{1}*z_{x}}*\left( {v_{x\; 0} - {\frac{v_{a}*F_{2}}{F_{1}*F_{obj}}\left( {F_{obj} - z_{x}} \right)}} \right)}} & \left\lbrack {{Equation}\mspace{14mu} 57} \right\rbrack \\{c_{x\; 2} = {\frac{f_{2}}{2*K*F_{1}*z_{x}}*\left( {v_{x\; 0} + {\frac{v_{a}*F_{2}}{F_{1}*F_{obj}}\left( {F_{obj} - z_{x}} \right)}} \right)}} & \left\lbrack {{Equation}\mspace{14mu} 58} \right\rbrack\end{matrix}$

In summary, we can say that it is possible to drift the focal spot at aconstant velocity along lines lying in horizontal planes (perpendicularto the objective axis); the focal distance z_(x) can be set by theacoustic frequency chirps in the AO deflectors. The ranges of z_(x) andv_(x0) available cannot be deduced from this analysis, they are limitedby the frequency bandwidths of the AO devices that limit the temporallength of the chirp sequences of a given slope.

Example II: The z_(x) Coordinate Depends on Time

If we want to drift the spot in the sample space along the z axis withinone AO switching time period, we have to allow for temporal change ofthe z_(x) coordinate. The formula:

$\begin{matrix}{{z_{x}(t)} = \frac{\frac{F_{2}}{F_{1}}}{\begin{matrix}{\frac{F_{2}}{F_{obj}F_{1}} + {K\;\frac{{F_{1}c_{x\; 1}} + c_{x\; 2}}{F_{2}\mspace{14mu} v_{a}}} +} \\{2K\;\frac{{F_{1}b_{x\; 1}} + b_{x\; 2}}{F_{2}\mspace{14mu} v_{a}}*\left( {t - \frac{D}{2v_{a}}} \right)}\end{matrix}}} & \left\lbrack {{Equation}\mspace{14mu} 59} \right\rbrack\end{matrix}$

comes from the constraint to focus all rays emerging from the AO cellsonto a single focal spot after the objective (see Equation 47 for thetime-independent z_(x)).

From Equation 59 we get:

$\begin{matrix}{{{{- \frac{F_{2}}{F_{obj}F_{1}}}\left( {F_{obj} - z_{x}} \right)} + {K\frac{F_{1}z_{x}}{F_{2}}\;\frac{c_{x\; 1} + c_{x\; 2}}{\; v_{a}}} + {2*K\;\frac{F_{1}z_{x}}{F_{2}}\frac{b_{x\; 1} + b_{x\; 2}}{v_{a}}*\left( {t - \frac{D}{2v_{a}}} \right)}} = 0} & \left\lbrack {{Equation}\mspace{14mu} 60} \right\rbrack\end{matrix}$

hence:

$\begin{matrix}{{z_{x}(t)} = \frac{\frac{F_{2}}{F_{1}}}{\begin{matrix}{\frac{F_{2}}{F_{obj}F_{1}} + {K\;\frac{{F_{1}c_{x\; 1}} + c_{x\; 2}}{F_{2}\mspace{14mu} v_{a}}} +} \\{2*K\;\frac{{F_{1}b_{x\; 1}} + b_{x\; 2}}{F_{2}\mspace{14mu} v_{a}}*\left( {t - \frac{D}{2v_{a}}} \right)}\end{matrix}}} & \left\lbrack {{Equation}\mspace{14mu} 61} \right\rbrack\end{matrix}$

This equation has, however, a non-linear temporal dependence. Therefore,we need its Taylor series to simplify further calculations:

$\begin{matrix}{{z_{x}(t)} = {\frac{\frac{F_{2}}{F_{1}}}{\begin{matrix}{\frac{F_{2}}{F_{obj}F_{1}} + {K\;\frac{F_{1}}{F_{2}}*\frac{c_{x\; 1} + c_{x\; 2}}{v_{a}}} -} \\{2*K\frac{F_{1}}{F_{2}}\frac{b_{x\; 1} + b_{{x\; 2}\;}}{v_{a}}*\left( \frac{D}{2v_{a}} \right)}\end{matrix}} + {\frac{{- 2}K\frac{b_{x\; 1} + b_{x\; 2}}{v_{a}}}{\begin{matrix}\left( {\frac{F_{2}}{F_{obj}F_{1}} + {K\;\frac{F_{1}}{F_{2}}*\frac{c_{x\; 1} + c_{x\; 2}}{v_{a}}} -} \right. \\\left. {2*K\frac{F_{1}}{F_{2}}\frac{b_{x\; 1} + b_{{x\; 2}\;}}{v_{a}}*\left( \frac{D}{2v_{a}} \right)} \right)^{2}\end{matrix}}*t} + {\frac{\left( {2K\frac{b_{x\; 1} + b_{x\; 2}}{v_{a}}} \right)^{2}*\frac{F_{1}}{F_{2}}}{\begin{matrix}\left( {\frac{F_{2}}{F_{obj}F_{1}} + {K\;\frac{F_{1}}{F_{2}}*\frac{c_{x\; 1} + c_{x\; 2}}{v_{a}}} -} \right. \\\left. {2*K\frac{F_{1}}{F_{2}}\frac{b_{x\; 1} + b_{{x\; 2}\;}}{v_{a}}*\left( \frac{D}{2v_{a}} \right)} \right)^{3}\end{matrix}}*t^{2}} + \ldots}} & {\left\lbrack {{Equation}\mspace{14mu} 26} \right\rbrack\mspace{11mu}}\end{matrix}$

To have a nearly constant velocity, the second and higher order terms inthe Taylor series should be small, or nearly vanish: this imposesconstraints on the b_(x1), b_(x2), c_(x1), and c_(x2) values. Oursimplest presumption is that the linear part will dominate timedependence over the quadratic part, which means that the ratio of theircoefficients should be small:

$\begin{matrix}{\frac{\left( {K\frac{b_{x\; 1} + b_{x\; 2}}{v_{a}}} \right)*\frac{F_{1}}{F_{2}}}{\begin{matrix}\left( {\frac{F_{2}}{F_{obj}F_{1}} + {K\frac{F_{1}}{F_{2}}*\frac{c_{x\; 1} + c_{x\; 2}}{v_{a}}} - {2*}} \right. \\\left. {K\frac{F_{1}}{F_{2}}\frac{b_{x\; 1} + b_{x\; 2}}{v_{a}}*\left( \frac{D}{2v} \right)} \right)\end{matrix}} ⪡ 1} & \left\lbrack {{Equation}\mspace{14mu} 63} \right\rbrack\end{matrix}$

However, the second member in the sum, the velocity along the z axis inthe z-x plane (v_(zx)), is also similarly expressed:

$\begin{matrix}{v_{zx} = \frac{\left( {{- 2}K\frac{b_{x\; 1} + b_{x\; 2}}{v_{a}}} \right)}{\begin{matrix}\left( {\frac{F_{2}}{F_{obj}F_{1}} + {K\frac{F_{1}}{F_{2}}*\frac{c_{x\; 1} + c_{x\; 2}}{v_{a}}} - {2*}} \right. \\\left. {K\frac{F_{1}}{F_{2}}\frac{b_{x\; 1} + b_{x\; 2}}{v_{a}}*\left( \frac{D}{2v_{a}} \right)} \right)^{2}\end{matrix}}} & \left\lbrack {{Equation}\mspace{14mu} 64} \right\rbrack\end{matrix}$

From Equation 35 we have b_(x1)=b_(x2)=b_(x), and this is not zero inthis case. We need other constraints to express b_(x), and furtherconstants.

The formula for the x₀ coordinate (from Equation 43) is:

$\begin{matrix}{{{{{x_{0}(t)} = {{- \frac{F_{2}}{F_{obj}F_{1}}}\left( {F_{obj} - {z_{x}(t)}} \right)*}}\quad}{\quad{x -}\quad}{\quad{{\quad\quad}\frac{F_{1}{z_{x}(t)}}{F_{2}}*{\quad\quad}}\quad}{a\left( {x,t} \right)}} = {{\quad{{\quad{- {\quad\quad}}\quad}\frac{F_{2}}{F_{obj}F_{1}}\left( {F_{obj} - \frac{\frac{F_{2}}{F_{1}}}{\begin{matrix}{\frac{F_{2}}{F_{obj}F_{1}} + {K\frac{F_{1}}{F_{2}}\frac{c_{x\; 1} + c_{x\; 2}}{v_{a}}} + {2*}} \\{K\frac{F_{1}}{F_{2}}\frac{b_{x\; 1} + b_{x2}}{v_{a}}*\left( {t - \frac{D}{2v_{a}}} \right)}\end{matrix}}} \right)*}\quad}{\quad{{x - {\frac{\frac{F_{2}}{F_{1}}}{\begin{matrix}{\frac{F_{2}}{F_{obj}F_{1}} + {K\frac{F_{1}}{F_{2}}\frac{c_{x\; 1} + c_{x\; 2}}{v_{a}}} + {2*}} \\{K\frac{F_{1}}{F_{2}}\frac{b_{x\; 1} + b_{x\; 2}}{v_{a}}*\left( {t - \frac{D}{2v_{a}}} \right)}\end{matrix}}*\frac{F_{1}}{F_{2}}*K*\left( {{f_{x\; 1}\left( {0,0} \right)} - {f_{x\; 2}\left( {0,0} \right)} + {\left( b_{x\; 1} \right)*\left( {t - \frac{D}{2v_{a}} - \frac{x}{v_{a}}} \right)^{2}} - {\left( b_{x\; 2} \right)*\left( {t - \frac{D}{2v_{a}} + \frac{x}{v_{a}}} \right)^{2}} + {\left( c_{x\; 1} \right)*\left( {t - \frac{D}{2v_{a}} - \frac{x}{v_{a}}} \right)} - {c_{x\; 2}*\left( {t - \frac{D}{2v_{a}} + \frac{x}{v_{a}}} \right)}} \right)}} = {{- \frac{1}{\begin{matrix}{\frac{F_{2}}{F_{obj}F_{1}} + {K\frac{F_{1}}{F_{2}}\frac{c_{x\; 1} + c_{x\; 2}}{v_{a}}} + {2*}} \\{K\frac{F_{1}}{F_{2}}\frac{b_{x\; 1} + b_{x\; 2}}{v_{a}}*\left( {t - \frac{D}{2v_{a}}} \right)}\end{matrix}}}*{\quad{K*}\quad}{\quad\left\lbrack {{f_{x\; 1}\left( {0,0} \right)} - {f_{x\; 2}\left( {0,0} \right)} + {\left( {t - \frac{D}{2v_{a}}} \right)*\left( {c_{x\; 1} - c_{x\; 2}} \right)}} \right\rbrack}}}}}} & \left\lbrack {{Equation}\mspace{14mu} 65} \right\rbrack\end{matrix}$

To find the drift velocity along the x axis we should differentiate theabove function with respect to t:

$\begin{matrix}{{v_{x}(t)} = {\frac{{dx}_{0}(t)}{dt} = {{+ \frac{2*K\frac{F_{1}}{F_{2}}\frac{b_{x\; 1} + b_{x\; 2}}{v_{a}}}{\begin{matrix}\left( {\frac{F_{2}}{F_{obj}F_{1}} + {K\frac{F_{1}}{F_{1}}\frac{c_{x\; 1} + c_{x\; 2}}{v_{a}}} + {2*}} \right. \\\left. {K\frac{F_{1}}{F_{2}}\frac{b_{x\; 1} + b_{x\; 2}}{v_{a}}*\left( {t - \frac{D}{2v_{a}}} \right)} \right)\end{matrix}}}*K*{\quad{\left\lbrack {{f_{x\; 1}\left( {0,0} \right)} - {f_{x\; 2}\left( {0,0} \right)} + {\left( {t - \frac{D}{2v_{a}}} \right)*\left( {c_{x\; 1} - c_{x\; 2}} \right)}} \right\rbrack - {\frac{1}{\begin{matrix}{\frac{F_{2}}{F_{obj}F_{1}} + {K\frac{F_{1}}{F_{2}}\frac{c_{x\; 1} + c_{x\; 2}}{v_{a}}} + {2*}} \\{K\frac{F_{1}}{F_{2}}\frac{b_{x\; 1} + b_{x\; 2}}{v_{a}}*\left( {t - \frac{D}{2v_{a}}} \right)}\end{matrix}}*K*\left\lbrack \left( {c_{x\; 1} - c_{x\; 2}} \right) \right\rbrack}}}}}} & \left\lbrack {{Equation}\mspace{14mu} 66} \right\rbrack\end{matrix}$

Taken at t=0, we can determinate the initial value v_(x0) of the driftvelocity component along the x axis:

$\begin{matrix}{v_{x\; 0} = {{+ \frac{2*K\frac{F_{1}}{F_{2}}\frac{b_{x\; 1} + b_{x\; 2}}{v_{a}}}{\begin{matrix}\left( {\frac{F_{2}}{F_{obj}F_{1}} + {K\frac{F_{1}}{F_{2}}\frac{c_{x\; 1} + c_{x\; 2}}{v_{a}}} + {2*}} \right. \\\left. {K\frac{F_{1}}{F_{2}}\frac{b_{x\; 1} + b_{x\; 2}}{v_{a}}*\left( \frac{D}{2v_{a}} \right)} \right)^{2}\end{matrix}}}*K*{\quad{\left\lbrack {{f_{1x}\left( {0,0} \right)} - {f_{2x}\left( {0,0} \right)} + {\left( {- \frac{D}{2v_{a}}} \right)*\left( {c_{x\; 1} - c_{x\; 2}} \right)}} \right\rbrack - {\frac{1}{\begin{matrix}{\frac{F_{2}}{F_{obj}F_{1}} + {K\frac{F_{1}}{F_{2}}\frac{c_{x\; 1} + c_{x\; 2}}{v_{a}}} + {2*}} \\{K\frac{F_{1}}{F_{2}}\frac{b_{x\; 1} + b_{x\; 2}}{v_{a}}*\left( {- \frac{D}{2v_{a}}} \right)}\end{matrix}}*K*\left\lbrack \left( {c_{x\; 1} - c_{x\; 2}} \right) \right\rbrack}}}}} & \left\lbrack {{Equation}\mspace{14mu} 67} \right\rbrack\end{matrix}$

If we take b_(x) from the expression of v_(zx) (Equation 64), andintroduce it into Equation 67 we will have an equation (Equation 68)that gives a constraint for the choice of c_(x1) and c_(x2). Thisconstraint relates c_(x1) and c_(x2) to v_(x0) and v_(zx):

$\begin{matrix}{{{K*\left( {v_{x} - {r*\Delta\; f_{0x}*v_{zx}}} \right)*\left( {1 - \frac{v_{zx}*D}{v_{a}*F_{obj}}} \right)*q} = {{\frac{F_{2}}{F_{obj}F_{1}}*\left( {v_{x} - {r*\Delta\; f_{0x}*v_{zx}}} \right)^{2}} + {\frac{v_{zx}*D*r^{2}}{v_{a}^{2}}*\left( {v_{x} - {r*\Delta\; f_{0x}*v_{zx}}} \right)*p*q} + {\frac{r}{v_{a}}*\left( {v_{x} - {r*\Delta\; f_{0x}*v_{zx}}} \right)^{2}*p} + {\frac{v_{zx}^{2}*D^{2}*r^{3}}{4*v_{a}^{3}}*p*q^{2}} + \frac{v_{zx}^{2}*D^{2}*r*K}{4*v_{a}^{2}*F_{obj}}}},{*q^{2}}} & \left\lbrack {{Equation}\mspace{14mu} 68} \right\rbrack\end{matrix}$

Here we introduced the following notations:

$\begin{matrix}{r:={K\frac{F_{1}}{F_{2}}}} & \left\lbrack {{Equation}\mspace{14mu} 69} \right\rbrack \\{{\Delta\; f_{0}\text{:} = {f_{1x}\left( {0,0} \right)}} - {f_{2x}\left( {0,0} \right)}} & \left\lbrack {{Equation}\mspace{14mu} 70} \right\rbrack \\{{q\text{:} = c_{x\; 1}} - c_{x\; 2}} & \left\lbrack {{Equation}\mspace{14mu} 71} \right\rbrack \\{{p\text{:} = c_{x\; 1}} + c_{x\; 2}} & \left\lbrack {{Equation}\mspace{14mu} 72} \right\rbrack\end{matrix}$

We can express p from Equation 68, resulting in a relationship between pand q:

$\begin{matrix}{p = \frac{\begin{matrix}{{\left( {1 - \frac{D*v_{zx}}{v_{a}*F_{obj}}} \right)*K*H*q} - {\frac{F_{2}}{F_{1}*F_{obj}}*}} \\{H^{2} - {\frac{v_{zx}^{2}*D^{2}*r*K}{{4*v_{a}^{2}} + F_{obj}}*q^{2}}}\end{matrix}}{\frac{r}{v_{a}}*\left( {\frac{v_{zx}*D*r*q}{2*v_{a}} + H} \right)^{2}}} & \left\lbrack {{Equation}\mspace{14mu} 73} \right\rbrack\end{matrix}$

where we introduced the notation:H:=v _(x) −r*Δf _(0x) *v _(zx)  [Equation 74]

These are general equations that apply to all possible trajectories.Practically, we can analyze the motion of the spot along differenttrajectories separately.

Motion in Space Along 3D Lines

A practically important possibility would be to set a linear trajectoryfor the drifting spot, following e.g. the axis of a measured dendrite oraxon. This is a general 3D line, with arbitrary angles relative to theaxes. The projections of this 3D line onto the x-z and y-z planes arealso lines that can be treated separately. We are dealing now with theprojection on the x-z plane. The projection on the y-z plane can behandled similarly; they are however not completely independent, as willbe shown later. If the spot is accelerated on the trajectory, theacceleration and initial velocity are also projected on the x-z and y-zplanes. We name the two orthogonal components of the initial velocity inthe x-z plane as v_(x0) and v_(zx0) which are parallel to the x and zaxis, respectively. Therefore, in the x-z plane we have for theprojection of the line trajectory:

$\begin{matrix}{{z(t)} = {{\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(t)}} + n}} & \left\lbrack {{Equation}\mspace{14mu} 75} \right\rbrack\end{matrix}$

To calculate the chirp parameters we must insert the temporal dependenceof the z(t) and x₀(t) functions, expressed in the Equations 62 and 65,respectively.

We introduce the following notations:

$\begin{matrix}{\overset{\sim}{u}:={\frac{F_{2}}{F_{obj}F_{1}} + {K\frac{F_{1}}{F_{2}}\frac{c_{x\; 1} + c_{x\; 2}}{v_{a}}}}} & \left\lbrack {{Equation}\mspace{14mu} 76} \right\rbrack \\{B = {{- 2}*K\frac{F_{1}}{F_{2}}\frac{b_{x\; 1} + b_{x\; 2}}{v_{a}}}} & \left\lbrack {{Equation}\mspace{14mu} 77} \right\rbrack \\{t^{\prime} = {t - \frac{D}{2v_{a}}}} & \left\lbrack {{Equation}\mspace{14mu} 78} \right\rbrack \\{M = \frac{F_{2}}{F_{1}}} & \left\lbrack {{Equation}\mspace{14mu} 79} \right\rbrack\end{matrix}$

Introducing these notations and the temporal dependences from Equations62 and 65 into Equation 75, we get the projection of the 3D line:

$\begin{matrix}{\frac{M}{\overset{\sim}{u} - {B*t^{\prime}}} = {{{- \frac{v_{{zx}\; 0}}{v_{x\; 0}}}*\frac{K}{\overset{\sim}{u} - {B*t^{\prime}}}\left( {{q*t^{\prime}} + {\Delta\; f_{0x}}} \right)} + n}} & \left\lbrack {{Equation}\mspace{14mu} 80} \right\rbrack\end{matrix}$

After some simplification we get:

$\begin{matrix}{M = {{{- \frac{v_{{zx}\; 0}}{v_{x\; 0}}}*K*\Delta\; f_{0x}} + {n*\overset{\sim}{u}} - {\left( {{\frac{v_{{zx}\; 0}}{v_{x\; 0}}*K*q} + {n*B}} \right)*t^{\prime}}}} & \left\lbrack {{Equation}\mspace{14mu} 81} \right\rbrack\end{matrix}$

This equation must be fulfilled for each time point t′. To be valid foreach t′, we must impose the following:

$\begin{matrix}{{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*K*\Delta\; f_{0x}} - {n*\overset{\sim}{u}}} = 0} & \left\lbrack {{Equation}\mspace{14mu} 82} \right\rbrack \\{{and}\text{:}} & \; \\{{{\frac{v_{{zx}\; 0}}{v_{x\; 0}}*K*q} + {n*B}} = 0} & \left\lbrack {{Equation}\mspace{14mu} 83} \right\rbrack\end{matrix}$

The first equation (Equation 82) gives:

$\begin{matrix}{\overset{\sim}{u} = \frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*K*\Delta\; f_{0x}}}{n}} & \left\lbrack {{Equation}\mspace{14mu} 84} \right\rbrack\end{matrix}$

Introducing ũ from Equation 76:

$\begin{matrix}{{\frac{F_{2}}{F_{obj}F_{1}} + {K\frac{F_{1}}{F_{2}}\frac{c_{x\; 1} + c_{x\; 2}}{v_{a}}}} = \frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*K*\Delta\; f_{0x}}}{n}} & \left\lbrack {{Equation}\mspace{14mu} 85} \right\rbrack\end{matrix}$

From this equation we can express p (defined by Equation 72) as follows:

$\begin{matrix}{p = {{c_{x\; 1} + c_{x\; 2}} = {\frac{v_{a}*M}{K}*\left( {\frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*K*\Delta\; f_{0x}}}{n} - \frac{M}{F_{obj}}} \right)}}} & \left\lbrack {{Equation}\mspace{14mu} 86} \right\rbrack\end{matrix}$

To express b_(x1)=b_(x2)=b and q=c_(x1)−c_(x2), we need anotherconstraint, that can be set from the desired value of the initialvelocity v_(zx0).

We take the derivative of z(t) (Equation 62) at t=0, to find the initialvelocity value, using the notations in Equations 76 and 77:

$\begin{matrix}{v_{{zx}\; 0}:={{v_{{zx}\;}(0)} = {- \frac{B*M}{{\overset{\sim}{u}}^{2}}}}} & \left\lbrack {{Equation}\mspace{14mu} 87} \right\rbrack\end{matrix}$

Expressing B from Equation S58:

$\begin{matrix}{B = {{- \frac{v_{{zx}\; 0}}{M}}*\left( \frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*K*\Delta\; f_{0x}}}{n} \right)^{2}}} & \left\lbrack {{Equation}\mspace{14mu} 88} \right\rbrack\end{matrix}$

Introducing the expression of B from Equation 77, we can yield theparameter b:

$\begin{matrix}{b = {\frac{v_{{zx}\; 0}*v_{a}}{4*K}*\left( \frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*K*\Delta\; f_{0x}}}{n} \right)^{2}}} & \left\lbrack {{Equation}\mspace{14mu} 89} \right\rbrack\end{matrix}$

To express q (defined by Equation 71) we use Equations 83 and 88:

$\begin{matrix}{q = {{c_{x\; 1} - c_{x\; 2}} = {n*\frac{v_{x\; 0}}{M*K}*\left( \frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*K*\Delta\; f_{0x}}}{n} \right)^{2}}}} & \left\lbrack {{Equation}\mspace{14mu} 90} \right\rbrack\end{matrix}$Finally, we can express c_(x1) and c_(x2) by adding and subtracting qand p (Equations 86 and 90):

$\begin{matrix}{{c_{x\; 1} = {{\frac{M*v_{a}}{2*K}*\left( {\frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*K*\Delta\; f_{0x}}}{n} - \frac{M}{F_{obj}}} \right)} + {\frac{v_{x\; 0}*n}{2*K*M}*\left( \frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*K*\Delta\; f_{0x}}}{n} \right)^{2}}}}\mspace{76mu}{{and}\text{:}}} & \left\lbrack {{Equation}\mspace{14mu} 91} \right\rbrack \\{c_{x\; 2} = {{\frac{M*v_{a}}{2*K}*\left( {\frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*K*\Delta\; f_{0x}}}{n} - \frac{M}{F_{obj}}} \right)} - {\frac{v_{x\; 0}*n}{2*K*M}*\left( \frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*K*\Delta\; f_{0x}}}{n} \right)^{2}}}} & \left\lbrack {{Equation}\mspace{14mu} 92} \right\rbrack\end{matrix}$The crucial parameter Δf_(0x) can be calculated from the initially setx₀(0) at t′=0. We then have:

$\begin{matrix}{{\Delta\; f_{0x}} = \frac{{x_{0}(0)}*F_{2}}{K*F_{obj}*F_{1}}} & \left\lbrack {{Equation}\mspace{14mu} 93} \right\rbrack\end{matrix}$In a preferred embodiment the characteristic parameters of the AOdevices are: K=0.002 rad/MHz, v=650*10⁶ μm/s, the magnification M=1 ofthe lens system following the acousto-optic deflectors, the initialfrequency difference Δf=10 MHz, and the movement parameters: m=2,v_(z0)=1 μm/μs, n=fobjective−4 μm. For these values, the c_(x1) valueresults in 3 kHz/μs, whereas c_(x2)=17 kHz/s.The acceleration a_(zx) in the z direction is approximately 0.1 m/s²with these parameters.Finally, we summarize our results. Here we demonstrate how it ispossible to calculate the parameters for the non-linear chirped driverfunction, in order to move the focal spot from a given point with agiven initial speed along a line path in the x-z plane. The parametersof the line path are selected according to the general formula, in 3D:x ₀ =x ₀(0)+s*v _(x0)y ₀ =y ₀(0)+s*v _(y0)z ₀ =z ₀(0)+s*v _(z0)  [Equation 94]Since the deflectors are deflecting in the x-z and y-z planes,transforming Equation S65 into the equations describe the lineprojections on these planes:

$\begin{matrix}{z_{0} = {{{m*x_{0}} + n} = {{z_{0}(0)} + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*x_{0}} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}}}} & \left\lbrack {{Equation}\mspace{14mu} 95a} \right\rbrack \\{z_{0} = {{{k*x_{0}} + l} = {{z_{0}(0)} + {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*y_{0}} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}}}} & \left\lbrack {{Equation}\mspace{14mu} 95b} \right\rbrack\end{matrix}$With these, we imply that v_(zx0)=vz_(y0)=v_(z0), and:

$\begin{matrix}{m = \frac{v_{{zx}\; 0}}{v_{x\; 0}}} & \left\lbrack {{Equation}\mspace{14mu} 96} \right\rbrack \\{k = \frac{v_{{zy}\; 0}}{v_{y\; 0}}} & \left\lbrack {{Equation}\mspace{14mu} 97} \right\rbrack \\{n = {{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}}} & \left\lbrack {{Equation}\mspace{14mu} 98} \right\rbrack \\{l = {{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}}} & \left\lbrack {{Equation}\mspace{14mu} 99} \right\rbrack\end{matrix}$To steer the deflectors, we need to determine the Δf_(0x), b_(x1),b_(x2), c_(x1), and c_(x2) parameters in the x-z plane as a function ofthe selected x₀(0), z₀(0), v_(x0), and v_(zx0) parameters of thetrajectory and drift. The same is valid for the y-z plane: here wedetermine Δf_(0y), b_(y1), b_(y2), c_(y1), and c_(y2) for the desiredy₀(0), z₀(0), v_(y0), and v_(zy0) of the trajectory.

The spot will then keep its shape during the drift, since thecorresponding constraint is fulfilled in both planes. The initialvelocities v_(x0) and v_(y0) along the x and y coordinates determine them and k parameters, together with the initial velocity v_(zx)=v_(zy) setfor z (Equations 96 and 97) and the acceleration values are alsodetermined by these parameters. The resulting acceleration values areusually low within the practical parameter sets, therefore the velocityof the spot will not change drastically for trajectories which are nottoo long.

For the optical calculation we use a paraxial approximation of the wholeAO microscope applied in two perpendicular planes whose orientations areset by the deflection directions of the AO deflectors (FIG. 9). We needthe following three groups of equations: i) the simplified matrixequation of the AO microscope in the x-z (and y-z) planes (Equations2-3); ii) the basic equation of the AO deflectors (Equation 7); and iii)temporally non-linear chirps for the acoustic frequencies in thedeflectors deflecting in the x-z (and y-z) plane (f):

$\begin{matrix}{{f_{i}\left( {x,t} \right)} = {{f_{i}\left( {0,0} \right)} + {\left( {{b_{xi}*\left( {t - {\frac{D}{2*v_{a}} \pm \frac{x}{v_{a}}}} \right)} + c_{xi}} \right)*\left( {t - {\frac{D}{2*v_{a}} \pm \frac{x}{v_{a}}}} \right)}}} & \left\lbrack {{Equation}\mspace{20mu} 100} \right\rbrack\end{matrix}$

(where i=1 or i=2, indicates the first and second x axis deflector D thediameter of the AO deflector; and v_(a) is the propagation speed of theacoustic wave within the deflector)

This equation was derived from Equations 10, 11, 19 and 20. In thisparagraph we calculate everything in the x-z plane, the x axis being thedeflection direction of one AO deflector pair (y being that of theother) and z is the optical axis coinciding with the symmetry axis ofthe cylindrical objective. The same calculation should be applied in they-z plane, too (see the detailed calculation above). From these threegroups of equations (i-iii) we can calculate the x₀ coordinate of thefocal spot (Equations 22,65). To have all rays focused in the focalpoint of the objective, the x and x²-dependent parts of the x₀coordinate must vanish (all rays starting at any x coordinate in thedeflector aperture must pass through the same x₀ coordinate in the focalplane), which implies two equations (Equations 44, 48), from which wecan express the t dependence of the z coordinate (Equation 61).

Equation 61 has, however, a non-linear temporal dependence. Therefore,we need its Taylor series to simplify further calculations. Our simplestpresumption was that for the linear part time dependence will dominateover the quadratic part; therefore, the velocity along the z axis in thez-x plane is nearly constant (v_(zx)) and, using Equation 64, thevelocity along the x axis (v_(x)) can be determined (see Equation 66).

In the last step we want to analyze the motion of the focal spot alongdifferent 3D trajectories. For simplicity, we calculate the drift alonga general 3D line with an arbitrary velocity and an arbitrary anglerelative to the axes. The x-z and y-z planes can be treated separatelyas above. In the x-z plane we can express the projection of the 3D lineas:

$\begin{matrix}{{z_{x}(t)} = {{\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(t)}} + z_{0} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}}} & \left\lbrack {{Equation}\mspace{14mu} 95a} \right\rbrack\end{matrix}$

When we combine the expression z_(x)(t) with x₀(t), the similarlycalculated z_(y)(t), and y₀(t), and add all the required initialpositions (x₀, y₀, z₀) and speed parameter values (v_(x0), v_(y0),v_(zx0)=v_(zy0)) of the focal spot, we can explicit all the parametersrequired to calculate the non-linear chirps according to Equation 100 inthe four AO deflectors (Δf_(0x), b_(x1), b_(x2), c_(x1), c_(x2) andΔf_(0y), b_(y1), b_(y2), c_(y1), c_(y2)):

$\left. {{{\left. \mspace{20mu}{{\Delta\; f_{0x}} = {{f_{1\; x}\left( {0,0} \right)} - {f_{2\; x}\left( {0,0} \right)}}} \right) \neq 0}\mspace{20mu}{{\Delta\; f_{0x}} = \frac{{x_{0}(0)}*F_{2}}{K*F_{obj}*F_{1}}}\mspace{20mu}{b_{x\; 1} = {\frac{v_{{zx}\; 0}*v_{a}}{4*K}*\left( \frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*\frac{{x_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}} \right)^{2}}}\mspace{20mu}{b_{x\; 2} = {\frac{v_{{zx}\; 0}*v_{a}}{4*K}*\left( \frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*\frac{{x_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}} \right)^{2}}}{c_{x\; 1} = {{\frac{M*v_{a}}{2*K}*\left( {\frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*\frac{{x_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}} - \frac{M}{F_{obj}}} \right)} + {\frac{v_{x\; 0}}{2*K*M}*\left( {{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}} \right)*\left( \frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*\frac{{x_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}} \right)^{2}}}}}{c_{x\; 2} = {{\frac{M*v_{a}}{2*K}*\left( {\frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*\frac{{x_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}} - \frac{M}{F_{obj}}} \right)} - {\frac{v_{x\; 0}*\left( {{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}} \right)}{2*K*M}*\left( \frac{M + {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*\frac{{x_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zx}\; 0}}{v_{x\; 0}}*{x_{0}(0)}}} \right)^{2}}}}\mspace{20mu}{{\Delta\; f_{0y}} = {{f_{1\; y}\left( {0,0} \right)} - {f_{2\; y}\left( {0,0} \right)}}}} \right) \neq 0$$\mspace{20mu}{{\Delta\; f_{0y}} = \frac{{y_{0}(0)}*F_{2}}{K*F_{obj}*F_{1}}}$$\mspace{20mu}{b_{y\; 1} = {\frac{v_{{zy}\; 0}*v_{a}}{4*K}*\left( \frac{M + {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*\frac{{y_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}} \right)^{2}}}$$\mspace{20mu}{b_{y\; 2} = {\frac{v_{{zy}\; 0}*v_{a}}{4*K}*\left( \frac{M + {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*\frac{{y_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}} \right)^{2}}}$$c_{y\; 1} = {{\frac{M*v_{a}}{2*K}*\left( {\frac{M + {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*\frac{{y_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}} - \frac{M}{f_{obj}}} \right)} + {\frac{v_{y\; 0}*\left( {{z_{0}(0)} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}} \right)}{2*K*M}*\left( \frac{M + {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*\frac{{y_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}} \right)^{2}}}$$c_{y\; 2} = {{\frac{M*v_{a}}{2*K}*\left( {\frac{M + {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*\frac{{y_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}} - \frac{M}{f_{obj}}} \right)} - {\frac{v_{y\; 0}*\left( {{z_{0}(0)} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}} \right)}{2*K*M}*\left( \frac{M + {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*\frac{{y_{0}(0)}*F_{2}}{F_{obj}*F_{1}}}}{{z_{0}(0)} - {\frac{v_{{zy}\; 0}}{v_{y\; 0}}*{y_{0}(0)}}} \right)^{2}}}$

Note that Δf_(0x), and Δf_(0y) are not fully determined; here we have anextra freedom to select from frequency ranges of the first (f₁) andsecond (f₂) group of AO deflectors to keep them in the middle of thebandwidth during 3D scanning. In summary, we were able to derive aone-to-one relationship between the focal spot coordinates and speed andthe chirp parameters of the AO deflectors. Therefore, we can generatefast movement along any 3D line, starting at any point in the scanningvolume.

3D Two-Photon Microscope

In the following exemplary embodiment, we improved 3D AO imaging methodby using a novel AO signal synthesis card implemented in the electronicssystem used earlier. The new card uses a high speed DA chip (AD9739A)fed with FPGA (Xilinx Spartan-6). The card at its current state allowsthe generation of 10-140 MHz signals of varying amplitude with frequencychirps implementing linear and quadratic temporal dependence.Synchronizing and commanding the cards allowed us to arbitrarily placethe focal spot and let it drift along any 3D line for every (10-35 μs)AO cycle. We measured the back reflection of the radio frequency (RF)driver signal at each of the AO deflectors directly, and compensated forthe RF reflection and loss to distribute RF energy more homogeneouslybetween deflectors. This allowed higher absolute acoustic energy on thecrystals, providing higher AO efficiency, and thus higher laser outputunder the objective and more homogeneous illumination of the scanningvolume.

We also implemented the following opto-mechanical modifications toimprove spatial resolution, extend field of view, and increase totaltransmitted light intensity. We removed the DeepSee unit of our Mai TaieHP femtosecond laser (875-880 nm, SpectraPhysics) and used only amotorized external four-prism compressor to compensate for most of thesecond- and third-order material dispersion (72,000 fs² and 40,000 fs³)of the optical path. Coherent back-reflection was eliminated using aFaraday isolator (Electro-Optics Technology). To eliminate opticalerrors induced by thermal drift we implemented motorized mirrors(AG-M100N, Newport) and quadrant detectors (PDQ80A, Thorlabs) inclosed-loop circuits in front of, and also behind, the motorizedfour-prism sequence. Z focusing and lateral scanning was achieved by twoseparate pairs of AO deflectors, which were coupled to two achromaticlenses (NT32-886, Edmund Optics). Finally, the light was coupled to anupright two-photon microscope (Femto2D, Femtonics Ltd.) using atelecentric relay consisting of an Edmund Optics (47319, f=200 mm) and aLinos (QIOPTIQ, G32 2246 525, f=180 mm) lens. The excitation laser lightwas delivered to the sample, and the fluorescence signal was collected,using either a 20× Olympus objective (XLUMPlanFI20×/1.0 lens, 20×, NA1.0) for population imaging, or a 25× Nikon objective (CF175 Apochromat25×W MP, NA 1.1) for spine imaging. The fluorescence was spectrallyseparated into two spectral bands by filters and dichroic mirrors, andit was then delivered to GaAsP photomultiplier tubes (Hamamatsu) fixeddirectly on the objective arm, which allows deep imaging in over a 800μm range with 2D galvano scanning. Because of the optical improvementsand increase in the efficiency of the radio frequency drive of the AOdeflectors, spatial resolution and scanning volume were increased byabout 15% and 36-fold, respectively. New software modules were developedfor fast 3D dendritic measurements, and to compensate for sample drift.

Motion Correction in 3D

Data resulting from the 3D ribbon scanning, multi-layer, multi-framescanning, and chessboard scanning methods are stored in a 3D array astime series of 2D frames. The 2D frames are sectioned to bars matchingthe AO drifts to form the basic unit of our motion correction method. Weselected the frame with the highest average intensity in the time seriesas a reference frame. Then we calculated cross correlation between eachframe and bar and the corresponding bars of the reference frame to yielda set of displacement vectors in the data space. Displacement vector foreach frame and for each bar is transformed to the Cartesian coordinatesystem of the sample knowing the scanning orientation for each bar.Noise bias is avoided by calculating the displacement vector of a frameas the median of the motion vectors of its bars. This commondisplacement vector of a single frame is transformed back to the dataspace. The resulting displacement vector for each bar in every frame isthen used to shift the data of the bars using linear interpolation forsubpixel precision. Gaps are filled with data from neighbouring bars,whenever possible.

Various modifications to the above disclosed embodiments will beapparent to a person skilled in the art without departing from the scopeof protection determined by the attached claims.

The invention claimed is:
 1. A method for scanning a region of interestwith a 3D laser scanning microscope having acousto-optic deflectors forfocusing a laser beam within a 3D space defined by an optical axis (Z)of the microscope and X, Y axes that are perpendicular to the opticalaxis and to each other, the method comprising: selecting guiding pointsalong the region of interest, fitting a 3D trajectory to the selectedguiding points, extending each scanning point of the 3D trajectory toscanning lines lying in the 3D space so as to extend along the directionof the optical axis, which scanning lines are transverse to the 3Dtrajectory at the scanning points and which scanning lines, together,define a substantially continuous surface, and scanning each scanningline by focusing the laser beam at one end of said each scanning lineand providing non-linear chirp signals for acoustic frequencies in thedeflectors for continuously moving a focus spot along said each scanningline, wherein each scanning point of the 3D trajectory is extended toprovide a plurality of parallel lines defining cuboides that aresubstantially centered on the 3D trajectory at the scanning points. 2.The method according to claim 1, wherein the scanning lines are curvedlines or substantially straight lines.